Commit Graph

2532 Commits

Author SHA1 Message Date
Saleem Abdulrasool a5ad591918 Driver: switch Windows to static RelocModel
Windows uses PE/COFF which is inherently position independent.  The use
of the PIC model is unnecessary.  In fact, we would generate invalid
code using the ELF PIC model when PIC was enabled previously.  Now that
we no longer accept -fPIC and -fpoc, this switches the internal
representation to the static model to permit us to make PIC modules
invalid when targeting Windows.  This should not change the code
generation, only the internal state management.

llvm-svn: 290569
2016-12-27 02:20:35 +00:00
Saleem Abdulrasool c47e1aab1c test: add explicit triples to the invocation
llvm-svn: 290534
2016-12-26 04:00:54 +00:00
Saleem Abdulrasool d133dc226f Driver: warn on -fPIC/-fpic/-fPIE/-fpie on Windows
Use of these flags would result in the use of ELF-style PIE/PIC code
which is incorrect on Windows.  Windows is inherently PIC by means of
the DLL slide that occurs at load.  This also mirrors the behaviour on
GCC for MinGW.  Currently, the Windows x86_64 forces the relocation
model to PIC (Level 2).  This is unchanged for now, though we should
remove any assumptions on that and change it to a static relocation
model.

llvm-svn: 290533
2016-12-26 03:35:24 +00:00
Chandler Carruth 50f9e893f2 [PM] Introduce options to enable the (still experimental) new pass
manager, and a code path to use it.

The option is actually a top-level option but does contain
'experimental' in the name. This is the compromise suggested by Richard
in discussions. We expect this option will be around long enough and
have enough users towards the end that it merits not being relegated to
CC1, but it still needs to be clear that this option will go away at
some point.

The backend code is a fresh codepath dedicated to handling the flow with
the new pass manager. This was also Richard's suggested code structuring
to essentially leave a clean path for development rather than carrying
complexity or idiosyncracies of how we do things just to share code with
the parts of this in common with the legacy pass manager. And it turns
out, not much is really in common even though we use the legacy pass
manager for codegen at this point.

I've switched a couple of tests to run with the new pass manager, and
they appear to work. There are still plenty of bugs that need squashing
(just with basic experiments I've found two already!) but they aren't in
this code, and the whole point is to expose the necessary hooks to start
experimenting with the pass manager in more realistic scenarios.

That said, I want to *strongly caution* anyone itching to play with
this: it is still *very shaky*. Several large components have not yet
been shaken down. For example I have bugs in both the always inliner and
inliner that I have already spotted and will be fixing independently.

Still, this is a fun milestone. =D

One thing not in this patch (but that might be very reasonable to add)
is some level of support for raw textual pass pipelines such as what
Sean had a patch for some time ago. I'm mostly interested in the more
traditional flow of getting the IR out of Clang and then running it
through opt, but I can see other use cases so someone may want to add
it.

And of course, *many* features are not yet supported!
- O1 is currently more like O2
- None of the sanitizers are wired up
- ObjC ARC optimizer isn't wired up
- ...

So plenty of stuff still lef to do!

Differential Revision: https://reviews.llvm.org/D28077

llvm-svn: 290450
2016-12-23 20:44:01 +00:00
Chandler Carruth fcd33149b4 Cleanup the handling of noinline function attributes, -fno-inline,
-fno-inline-functions, -O0, and optnone.

These were really, really tangled together:
- We used the noinline LLVM attribute for -fno-inline
  - But not for -fno-inline-functions (breaking LTO)
  - But we did use it for -finline-hint-functions (yay, LTO is happy!)
  - But we didn't for -O0 (LTO is sad yet again...)
- We had weird structuring of CodeGenOpts with both an inlining
  enumeration and a boolean. They interacted in weird ways and
  needlessly.
- A *lot* of set smashing went on with setting these, and then got worse
  when we considered optnone and other inlining-effecting attributes.
- A bunch of inline affecting attributes were managed in a completely
  different place from -fno-inline.
- Even with -fno-inline we failed to put the LLVM noinline attribute
  onto many generated function definitions because they didn't show up
  as AST-level functions.
- If you passed -O0 but -finline-functions we would run the normal
  inliner pass in LLVM despite it being in the O0 pipeline, which really
  doesn't make much sense.
- Lastly, we used things like '-fno-inline' to manipulate the pass
  pipeline which forced the pass pipeline to be much more
  parameterizable than it really needs to be. Instead we can *just* use
  the optimization level to select a pipeline and control the rest via
  attributes.

Sadly, this causes a bunch of churn in tests because we don't run the
optimizer in the tests and check the contents of attribute sets. It
would be awesome if attribute sets were a bit more FileCheck friendly,
but oh well.

I think this is a significant improvement and should remove the semantic
need to change what inliner pass we run in order to comply with the
requested inlining semantics by relying completely on attributes. It
also cleans up tho optnone and related handling a bit.

One unfortunate aspect of this is that for generating alwaysinline
routines like those in OpenMP we end up removing noinline and then
adding alwaysinline. I tried a bunch of other approaches, but because we
recompute function attributes from scratch and don't have a declaration
here I couldn't find anything substantially cleaner than this.

Differential Revision: https://reviews.llvm.org/D28053

llvm-svn: 290398
2016-12-23 01:24:49 +00:00
Chandler Carruth 93786da2cb Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'.
Much to my surprise, '-disable-llvm-optzns' which I thought was the
magical flag I wanted to get at the raw LLVM IR coming out of Clang
deosn't do that. It still runs some passes over the IR. I don't want
that, I really want the *raw* IR coming out of Clang and I strongly
suspect everyone else using it is in the same camp.

There is actually a flag that does what I want that I didn't know about
called '-disable-llvm-passes'. I suspect many others don't know about it
either. It both does what I want and is much simpler.

This removes the confusing version and makes that spelling of the flag
an alias for '-disable-llvm-passes'. I've also moved everything in Clang
to use the 'passes' spelling as it seems both more accurate (*all* LLVM
passes are disabled, not just optimizations) and much easier to remember
and spell correctly.

This is part of simplifying how Clang drives LLVM to make it cleaner to
wire up to the new pass manager.

Differential Revision: https://reviews.llvm.org/D28047

llvm-svn: 290392
2016-12-23 00:23:01 +00:00
Devin Coughlin 8beac28564 [analyzer] Add checker modeling gtest APIs.
gtest is a widely-used unit-testing API. It provides macros for unit test
assertions:

  ASSERT_TRUE(p != nullptr);

that expand into an if statement that constructs an object representing
the result of the assertion and returns when the assertion is false:

  if (AssertionResult gtest_ar_ = AssertionResult(p == nullptr))
      ;
  else
    return ...;

Unfortunately, the analyzer does not model the effect of the constructor
precisely because (1) the copy constructor implementation is missing from the
the header (so it can't be inlined) and (2) the boolean-argument constructor
is constructed into a temporary (so the analyzer decides not to inline it since
it doesn't reliably call temporary destructors right now).

This results in false positives because the analyzer does not realize that the
the assertion must hold along the non-return path.

This commit addresses the false positives by explicitly modeling the effects
of the two un-inlined constructors on the AssertionResult state.

I've added a new package, "apiModeling", for these kinds of checkers that
model APIs but don't emit any diagnostics. I envision all the checkers in
this package always being on by default.

This addresses the false positives reported in PR30936.

Differential Revision: https://reviews.llvm.org/D27773

rdar://problem/22705813

llvm-svn: 290143
2016-12-19 22:50:31 +00:00
Prakhar Bahuguna 9390d84d10 [ARM] Add missing -backend-option for -arm-execute-only
llvm-svn: 290110
2016-12-19 15:43:33 +00:00
Justin Lebar 3cf25461e0 [CUDA] Add --ptxas-path= flag.
Summary:
This lets you build with one CUDA installation but use ptxas from
another install.

This is useful e.g. if you want to avoid bugs in an old ptxas without
actually upgrading wholesale to a newer CUDA version.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D27788

llvm-svn: 289847
2016-12-15 18:44:57 +00:00
Ahmed Bougacha 24f5776216 [Driver] Bump default x86 cpu to Penryn when targeting macosx10.12+.
10.12 dropped support for all pre-Penryn Macs.

llvm-svn: 289839
2016-12-15 18:14:27 +00:00
Prakhar Bahuguna 61ef150d53 [ARM] Implement execute-only support in CodeGen
Summary:
This implements execute-only support for ARM code generation, which
prevents the compiler from generating data accesses to code sections.
The following changes are involved:

* Add the CodeGen option "-arm-execute-only" to the ARM code generator.
* Add the clang flag "-mexecute-only" as well as the GCC-compatible
  alias "-mpure-code" to enable this option.
* When enabled, literal pools are replaced with MOVW/MOVT instructions,
  with VMOV used in addition for floating-point literals. As the MOVT
  instruction is required, execute-only support is only available in
  Thumb mode for targets supporting ARMv8-M baseline or Thumb2.
* Jump tables are placed in data sections when in execute-only mode.
* The execute-only text section is assigned section ID 0, and is
  marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'.
  This also overrides selection of ELF sections for globals.

Reviewers: t.p.northover, rengolin

Subscribers: llvm-commits, aemerson

Differential Revision: https://reviews.llvm.org/D27450

llvm-svn: 289786
2016-12-15 07:59:24 +00:00
Joerg Sonnenberger abedf7a0c0 Use PIC relocation mode by default for PowerPC64 ELF
Most of the PowerPC64 code generation already creates PIC access. This
changes to a full PIC default, similar to what GCC is doing.

Overall, a monolithic clang binary shrinks by 600KB (about 1%). This can
be a slight regression for TLS access and will use the TOC more
aggressively instead of synthesizing immediates. It is expected to be
performance neutral.

Differential Revision: https://reviews.llvm.org/D26564

llvm-svn: 289744
2016-12-15 00:02:57 +00:00
Tim Northover 64aec507e8 AArch64: add architecture version feature to Clang invocation.
Otherwise we don't get the correct predefines and so on in the front-end (or
the right features in the backend).

llvm-svn: 289692
2016-12-14 19:21:30 +00:00
Devin Coughlin 78c17385cb [Driver] Add tests for enabled static analyzer checkers.
The driver passes flags to cc1 that enable various checkers based on
the target triple. This commit adds tests for these flags on Darwin, Linux,
and Windows.

This is a test-only change.

llvm-svn: 289685
2016-12-14 18:46:01 +00:00
Evandro Menezes ba17775c84 Add support for Samsung Exynos M3 (NFC)
llvm-svn: 289614
2016-12-13 23:31:57 +00:00
Michal Gorny 108044a61c [Driver] Attempt to fix new linux-ld tests on Windows
(broken by r289436)

llvm-svn: 289440
2016-12-12 16:04:37 +00:00
Michal Gorny f4debddb09 [Driver] Fix finding multilib gcc install on Gentoo (with gcc-config)
Fix the gcc-config code to support multilib gcc installs properly. This
solves two problems: -mx32 using the 64-bit gcc directory (due to matching
installation triple), and -m32 not respecting gcc-config at all (due to
mismatched installation triple).

In order to fix the former issue, split the multilib scan out of
Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple() (the code
is otherwise unchanged), and call it for each installation found via
gcc-config.

In order to fix the latter issue, split the gcc-config processing out of
Generic_GCC::GCCInstallationDetector::init() and repeat it for all
triples, including extra and biarch triples. The only change
in the gcc-config code itself is adding the call to multilib scan.

Convert the gentoo_linux_gcc_multi_version_tree test input to multilib
x86_64+32+x32 install, and add appropriate tests to linux-header-search
and linux-ld.

Differential Revision: https://reviews.llvm.org/D26887

llvm-svn: 289436
2016-12-12 15:07:43 +00:00
Artem Belevich a424e88eab [CUDA,Driver] Added --no-cuda-gpu-arch= option.
This allows us to negate preceding --cuda-gpu-arch=X.
This comes handy when user needs to override default
flags set for them by the build system.

Differential Revision: https://reviews.llvm.org/D27631

llvm-svn: 289287
2016-12-09 22:59:17 +00:00
Mike Aizatsky d1033f5756 [sanitizers] lsan+sancov doesn't need ubsanrt (multi def error)
Reviewers: eugenis

Differential Revision: https://reviews.llvm.org/D27594

llvm-svn: 289144
2016-12-08 22:25:01 +00:00
David L. Jones b4b88fdc75 Loosen checks for _MSC_FULL_VER under -fms-extensions.
Summary:
On actual Windows hosts :-) , this could report something other than the
fallback, with a non-zero minor/build number.

Reviewers: rnk, llvm-commits

Differential Revision: https://reviews.llvm.org/D27554

llvm-svn: 289011
2016-12-08 01:11:41 +00:00
Bruno Cardoso Lopes cfd183ee7e [Driver][Darwin] Disable default stack protector levels in freestanding mode.
Currently -fstack-protector is on by default when using -ffreestanding.
Change the default behavior to have it off when using -ffreestanding.

rdar://problem/14089363

llvm-svn: 289005
2016-12-08 00:22:06 +00:00
David L. Jones 62cd86863a Add more tests for MSVC version handling.
Summary:
This change adds more test cases for the default MSVC compatibility version:
 1. When -fms-extensions is supplied, but -fmsc-version and
    -fms-compatibility-version are not.
 2. With the target triple specifies an MSVC environment, but no other
    -fms* flags.

Reviewers: rnk, llvm-commits

Subscribers: hans, compnerd, amccarth

Differential Revision: https://reviews.llvm.org/D27498

llvm-svn: 288997
2016-12-07 23:39:44 +00:00
Bruno Cardoso Lopes 77bb405330 [Driver] Add tests for default stack protector values on Darwin
llvm-svn: 288994
2016-12-07 23:20:30 +00:00
Sam McCall 59336a0a45 Compilation database test: don't try to output to CWD
Summary:
Write output from compilation database test to %T rather than the working dir.
Sometimes CWD isn't writable!
Also specify no-canonical-prefixes so that clang has 'clang' in the name.

Reviewers: bkramer

Subscribers: joerg, cfe-commits

Differential Revision: https://reviews.llvm.org/D27504

llvm-svn: 288892
2016-12-07 09:19:07 +00:00
Duncan P. N. Exon Smith c9073fa806 Driver: Remove support for -fobjc-gc*
As a first step toward removing Objective-C garbage collection from
Clang, remove support from the driver.  I'm hoping this will flush out
any expected bots/configurations/whatever that might rely on it.

I've left the options behind temporarily in -cc1 to keep tests passing.
I'll kill them off entirely in a follow up when I've had a chance to
update/delete the rest of Clang.

llvm-svn: 288872
2016-12-07 00:31:10 +00:00
Joerg Sonnenberger 3661087111 Fix FileCheck pattern.
llvm-svn: 288828
2016-12-06 17:06:33 +00:00
Joerg Sonnenberger a53561f60e Allow additional output since e.g. OSX appends flags like
"-mlinker-version=264.3.102" automatically. Wiring down a target on the
other hand is problematic as this actually needs to run codegen and
doesn't work with -###.

llvm-svn: 288827
2016-12-06 17:02:41 +00:00
Joerg Sonnenberger d4435e331a Make test case slightly more robust by explicitly passing --sysroot.
Otherwise it would change when DEFAULT_SYSROOT is provided.

llvm-svn: 288823
2016-12-06 16:47:00 +00:00
Joerg Sonnenberger cbc872549c Allow clang to write compilation database records.
When integrating compilation database output into existing build
systems, two approaches dominate so far. Ad-hoc implementation of the
JSON output rules or using compiler wrappers. This patch adds a new
option "-MJ foo.json" which gives a slightly cleaned up compilation
record. The output is a fragment, i.e. you still need to add the array
markers, but it allows multiple files to be easy merged.

This way the only change in a build system is adding the option with
potentially a per-target output file and merging the files with
something like
  (echo '['; cat *.o.json; echo ']' > compilation_database.json
or some additional filtering to remove the trailing comma for strict
JSON compliance.

Differential Revision: https://reviews.llvm.org/D27140

llvm-svn: 288821
2016-12-06 16:33:22 +00:00
Mandeep Singh Grang 6d1d36c4b7 [clang] Fix D26214: Move error handling out of MC and to the callers.
Summary: Related llvm patch: https://reviews.llvm.org/D27359

Reviewers: echristo, t.p.northover, rengolin, grosbach, compnerd

Subscribers: mehdi_amini, cfe-commits, llvm-commits

Tags: #clang-c

Differential Revision: https://reviews.llvm.org/D27360

llvm-svn: 288762
2016-12-06 02:49:16 +00:00
Adam Nemet fc9e246463 With LTO and profile-use, enable hotness info in opt remarks
This is to match the behavior of non-LTO;
when -fsave-optimization-record is passed and PGO is available we enable
the generation of hotness information in the optimization records.

Differential Revision: https://reviews.llvm.org/D27332

llvm-svn: 288520
2016-12-02 17:54:34 +00:00
NAKAMURA Takumi 91a5fa1b6f clang/test/Driver/defsym.s: Appease targeting msc. It is incapable of external assembler in trunk.
llvm-svn: 288478
2016-12-02 05:09:21 +00:00
Jason Henline 13bba6966f [CUDA] Fix faulty test from rL288448
Summary:
The test introduced by rL288448 is currently failing because
unimportant but unexpected errors appear as output from a test compile
line. This patch looks for a more specific error message, in order to
avoid false positives.

Reviewers: jlebar

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D27328

Switch to more specific error

llvm-svn: 288453
2016-12-02 02:04:43 +00:00
Jason Henline c3e24403f0 [CUDA] "Support" ASAN arguments in CudaToolChain
This fixes a bug that was introduced in rL287285. The bug made it
illegal to pass -fsanitize=address during CUDA compilation because the
CudaToolChain class was switched from deriving from the Linux toolchain
class to deriving directly from the ToolChain toolchain class. When
CudaToolChain derived from Linux, it used Linux's getSupportedSanitizers
method, and that method allowed ASAN, but when it switched to deriving
directly from ToolChain, it inherited a getSupportedSanitizers method
that didn't allow for ASAN.

This patch fixes that bug by creating a getSupportedSanitizers method
for CudaToolChain that supports ASAN.

This patch also fixes the test that checks that -fsanitize=address is
passed correctly for CUDA builds. That test didn't used to notice if an
error message was emitted, and that's why it didn't catch this bug when
it was first introduced. With the fix from this patch, that test will
now catch any similar bug in the future.

llvm-svn: 288448
2016-12-02 01:42:54 +00:00
Artem Belevich 5fb9b5e1c9 Send compiler output to /dev/null in defsym.s test.
Fixes test failures if tests are run in a read-only source tree.

llvm-svn: 288406
2016-12-01 19:34:35 +00:00
Mandeep Singh Grang 358faec6ab [clang] Implement support for -defsym assembler option
Summary:
Adds support for -Wa,-defsym,abc=1 option.

Related llvm patch: https://reviews.llvm.org/D26214

Reviewers: rafael, t.p.northover, colinl, echristo, compnerd, rengolin

Subscribers: mehdi_amini

Tags: #clang-c

Differential Revision: https://reviews.llvm.org/D26213

llvm-svn: 288397
2016-12-01 18:42:16 +00:00
Florian Hahn 15be03a922 Fix crash with unsupported architectures in Linux/Gnu target triples.
Summary: This patch adds a check and an error message to gnutools::Linker::ConstructJob in case the architecture is not supported. For most other operating systems, the error message is created in lib/Basic/Targets.cpp:AllocateTarget, but when construction the linker arguments for the gnutools linker a supported architecture is required.

Reviewers: rafael, joerg, echristo

Subscribers: mehdi_amini, joerg, dschuff, cfe-commits

Differential Revision: https://reviews.llvm.org/D27066

llvm-svn: 288327
2016-12-01 11:02:59 +00:00
Bob Haarman 2fae56fce4 make -fprofile-instr-generate and -fprofile-instr-use work with clang-cl
Summary: Makes -fprofile-instr-generate and -fprofile-instr-use work
with clang-cl so that profile-guided optimization can be used.

Differential Revision: https://reviews.llvm.org/D27086

llvm-svn: 288230
2016-11-30 03:25:36 +00:00
Nico Weber 9b3baaa74a darwin: Unconditionally pass -lto_library, remove -Wliblto warning.
https://reviews.llvm.org/D25932 made it so that clang always checks if
libLTO.dylib is present on disk, even if -flto is not being used. The
motivation for that change was that if a dependency happens to contain bitcode,
ld64 will try to load libLTO without -flto explicitly being enabled. However,
the change had the undesirable side effect of warning if libLTO.dylib doesn't
exist even if it isn't needed.

Change things so that -lto_library is always passes, independent of if it
exists or not. ld64 only looks at this flag if it uses LTO. If the dylib
exists, all is well. If it doesn't, and LTO is not being used, all is well too.
If ld64 does end up using LTO and the dylib does not exist, ld64 will print
something like

    ld: could not process llvm bitcode object file, because foo/libLTO.dylib could not be loaded file 'test.o' for architecture x86_64

https://reviews.llvm.org/D26984

llvm-svn: 287685
2016-11-22 19:38:07 +00:00
Adam Nemet 43018fdbe5 Rename option to -lto-pass-remarks-output
The new option -pass-remarks-output broke LLVM_LINK_LLVM_DYLIB because
of the duplicate option name with opt.

llvm-svn: 287628
2016-11-22 07:35:19 +00:00
Dean Michael Berris 3abce99b67 [XRay] Support AArch64 in Clang
This patch adds XRay support in Clang for AArch64 target.
This patch is one of a series:

LLVM: https://reviews.llvm.org/D26412
compiler-rt: https://reviews.llvm.org/D26413

Author: rSerge

Reviewers: rengolin, dberris

Subscribers: aemerson, cfe-commits, iid_iunknown

Differential Revision: https://reviews.llvm.org/D26415

llvm-svn: 287518
2016-11-21 03:24:59 +00:00
Adam Nemet e4b9fd9852 LTO support for -fsave-optimization-record on Darwin
I guess this would have to be added for each linker.

Differential Revision: https://reviews.llvm.org/D26833

llvm-svn: 287358
2016-11-18 18:17:36 +00:00
Justin Lebar 66c4fd7987 [CUDA] Driver changes to support CUDA compilation on MacOS.
Summary:
Compiling CUDA device code requires us to know the host toolchain,
because CUDA device-side compiles pull in e.g. host headers.

When we only supported Linux compilation, this worked because
CudaToolChain, which is responsible for device-side CUDA compilation,
inherited from the Linux toolchain.  But in order to support MacOS,
CudaToolChain needs to take a HostToolChain pointer.

Because a CUDA toolchain now requires a host TC, we no longer will
create a CUDA toolchain from Driver::getToolChain -- you have to go
through CreateOffloadingDeviceToolChains.  I am *pretty* sure this is
correct, and that previously any attempt to create a CUDA toolchain
through getToolChain() would eventually have resulted in us throwing
"error: unsupported use of NVPTX for host compilation".

In any case hacking getToolChain to create a CUDA+host toolchain would
be wrong, because a Driver can be reused for multiple compilations,
potentially with different host TCs, and getToolChain will cache the
result, causing us to potentially use a stale host TC.

So that's the main change in this patch.

In addition, we have to pull CudaInstallationDetector out of Generic_GCC
and into a top-level class.  It's now used by the Generic_GCC and MachO
toolchains.

Reviewers: tra

Subscribers: rryan, hfinkel, sfantao

Differential Revision: https://reviews.llvm.org/D26774

llvm-svn: 287285
2016-11-18 00:41:22 +00:00
Bruno Cardoso Lopes 02681c4af6 [CrashReproducer][Darwin] Suggest attaching .crash diagnostic file
In addition to the preprocessed sources file and reproducer script, also
point to the .crash diagnostic files on Darwin. Example:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.cpp
clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.cache
clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.sh
clang-4.0: note: diagnostic msg: /var/folders/bk/1hj20g8j4xvdj5gd25ywhd3m0000gq/T/RegAllocGreedy-238f28.crash

When no match is found for the .crash, point the user to a directory
where those can be found. Example:

clang-4.0: note: diagnostic msg: Crash backtrace is located in
clang-4.0: note: diagnostic msg: /Users/bruno/Library/Logs/DiagnosticReports/clang-4.0_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang-4.0: note: diagnostic msg: (choose the .crash file that corresponds to your crash)

rdar://problem/27286266

llvm-svn: 287262
2016-11-17 21:41:22 +00:00
Steven Wu 844ab6a012 [Driver] Infer the correct option to ld64 for -fembed-bitcode
Summary:
-fembed-bitcode infers -bitcode_bundle to ld64 but it is not correctly
passed when using LTO. LTO is a special case of -fembed-bitcode which
it doesn't require embed the bitcode in a special section in the object
file but it requires linker to save that as part of the final executable.

rdar://problem/29274226

Reviewers: mehdi_amini

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D26690

llvm-svn: 287084
2016-11-16 06:06:44 +00:00
Chad Rosier d5d761663e [AArch64] Add driver tests for Qualcomm's Falkor CPU.
Differential Revision: https://reviews.llvm.org/D26674

llvm-svn: 287037
2016-11-15 21:34:31 +00:00
Sumanth Gundapaneni 348ace2605 Fix the unit test darwin-multiarch-arm.c for windows
llvm-svn: 286842
2016-11-14 17:09:39 +00:00
Brad Smith 26a0d805f3 Revert r286735 due to test failure
llvm-svn: 286736
2016-11-13 00:16:21 +00:00
Brad Smith 790092b61b Link static PIE programs against rcrt0.o on OpenBSD
Patch by Stefan Kempf.

llvm-svn: 286735
2016-11-12 23:52:03 +00:00
Evgeniy Stepanov 8a2bedbf27 Tread TSan LLVM flags to driver: add TSan controlling flags to clang.
Summary:
New clang flags, all default to true:
-f[no-]sanitize-thread-data-races
-f[no-]sanitize-thread-stack-traces
-f[no-]sanitize-thread-atomics

Reviewers: dvyukov, pcc, eugenis

Subscribers: pcc, cfe-commits

Patch by Alex Shlyapnikov.

Differential Revision: https://reviews.llvm.org/D26461

llvm-svn: 286669
2016-11-11 23:17:36 +00:00