summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Merging r345470:Tom Stellard2018-12-051-1/+1
| | | | | | | | | | | ------------------------------------------------------------------------ r345470 | brad | 2018-10-27 20:30:18 -0700 (Sat, 27 Oct 2018) | 2 lines Reapply Pass the nopie flag to the linker when linking with -pg. ------------------------------------------------------------------------ llvm-svn: 348405
* Merging r347179:Tom Stellard2018-11-292-4/+8
| | | | | | | | | | | | | ------------------------------------------------------------------------ r347179 | brad | 2018-11-18 16:21:06 -0800 (Sun, 18 Nov 2018) | 4 lines [PowerPC] Set the default PLT mode on OpenBSD/powerpc to Secure PLT. OpenBSD/powerpc only supports Secure PLT. ------------------------------------------------------------------------ llvm-svn: 347822
* Merging r341312:Tom Stellard2018-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r341312 | psmith | 2018-09-03 05:36:32 -0700 (Mon, 03 Sep 2018) | 13 lines [Aarch64] Fix linker emulation for Aarch64 big endian This patch fixes target linker emulation for aarch64 big endian. aarch64_be_linux is not recognized by gnu ld. The equivalent emulation mode supported by gnu ld is aarch64linuxb. Patch by: Bharathi Seshadri Reviewed by: Peter Smith Differential Revision: https://reviews.llvm.org/D42930 ------------------------------------------------------------------------ llvm-svn: 345920
* Merging r340025:Tom Stellard2018-10-251-3/+4
| | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340025 | erichkeane | 2018-08-17 06:43:39 -0700 (Fri, 17 Aug 2018) | 8 lines Fix for bug 38508 - Don't do PCH processing when only generating preprocessor output This clang-cl driver change removes the PCH options when we are only generating preprocessed output. This is similar to the behavior of Y-. Patch by: mikerice Differential Revision: https://reviews.llvm.org/D50640 ------------------------------------------------------------------------ llvm-svn: 345311
* Disable the GNUstep v2 ABI on Windows.David Chisnall2018-09-041-2/+1
| | | | | | | | | | | The code remains so that we can potentially reenable it in a point release, but the driver will reject it. Several issues were raised during testing that made it clear that this was not quite ready for general consumption. Approved by: Hans Wennborg llvm-svn: 341354
* Merging r338934:Hans Wennborg2018-08-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r338934 | vsapsai | 2018-08-04 01:12:37 +0200 (Sat, 04 Aug 2018) | 29 lines [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable. Libc++ needs to know when aligned allocation is supported by clang, but is otherwise unavailable at link time. Otherwise, libc++ will incorrectly end up generating calls to `__builtin_operator_new`/`__builtin_operator_delete` with alignment arguments. This patch implements the following changes: * The `__cpp_aligned_new` feature test macro to no longer be defined when aligned allocation is otherwise enabled but unavailable. * The Darwin driver no longer passes `-faligned-alloc-unavailable` when the user manually specifies `-faligned-allocation` or `-fno-aligned-allocation`. * Instead of a warning Clang now generates a hard error when an aligned allocation or deallocation function is referenced but unavailable. Patch by Eric Fiselier. Reviewers: rsmith, vsapsai, erik.pilkington, ahatanak, dexonsmith Reviewed By: rsmith Subscribers: Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D45015 ------------------------------------------------------------------------ llvm-svn: 339660
* Merging r339428 and r339494:Hans Wennborg2018-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r339428 | theraven | 2018-08-10 14:53:13 +0200 (Fri, 10 Aug 2018) | 18 lines Add Windows support for the GNUstep Objective-C ABI V2. Summary: Introduces funclet-based unwinding for Objective-C and fixes an issue where global blocks can't have their isa pointers initialised on Windows. After discussion with Dustin, this changes the name mangling of Objective-C types to prevent a C++ catch statement of type struct X* from catching an Objective-C object of type X*. Reviewers: rjmccall, DHowett-MSFT Reviewed By: rjmccall, DHowett-MSFT Subscribers: mgrang, mstorsjo, smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D50144 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r339494 | dyung | 2018-08-11 04:46:47 +0200 (Sat, 11 Aug 2018) | 2 lines Make the section boundary checks on Windows not depend on the order as they are emitted in reverse when the compiler is built by Visual C++. ------------------------------------------------------------------------ llvm-svn: 339538
* Revert r337635 "[Driver] Sanitizer support based on runtime library presence"Reid Kleckner2018-07-312-65/+23
| | | | | | | | This change causes issues with distributed build systems, which may only have compiler binaries without any runtime libraries. See discussion about this on https://reviews.llvm.org/D15225. llvm-svn: 338444
* [RISCV] Add driver for riscv32-unknown-elf baremetal targetDavid Bolvansky2018-07-315-1/+182
| | | | | | | | | | | | | | | | | Summary: This patch adds a driver for the baremetal RISC-V target (i.e. riscv32-unknown-elf). For reference, D39963 added basic target info and added support for riscv32-linux-unknown-elf. Patch by: asb (Alex Bradbury) Reviewers: efriedma, phosek, apazos, espindola, mgrang Reviewed By: mgrang Subscribers: jrtc27, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, emaste, mgorny, arichardson, rbar, johnrusso, simoncook, jordy.potman.lists, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D46822 llvm-svn: 338385
* [OpenEmbedded] Fix lib paths for OpenEmbedded targetsMandeep Singh Grang2018-07-302-2/+10
| | | | | | | | | | | | | | | | | | | | | Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots (like arm-oe-linux-gnueabi) for 2 reasons: 1. OpenEmbedded sysroots are of the form <sysroot>/usr/lib/<triple>/x.y.z. This form is handled in clang but only for Freescale vendor. 2. 64-bit OpenEmbedded sysroots may not have a /usr/lib dir. So they cannot find /usr/lib64 as it is referenced as /usr/lib/../lib64 in clang. This is a follow-up to the llvm patch: D48861 Reviewers: dlj, rengolin, fedor.sergeev, javed.absar, hfinkel, rsmith Reviewed By: rsmith Subscribers: rsmith, kristof.beyls, cfe-commits Differential Revision: https://reviews.llvm.org/D48862 llvm-svn: 338294
* Remove trailing spaceFangrui Song2018-07-303-3/+3
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
* [clang][ubsan] Implicit Conversion Sanitizer - integer truncation - clang partRoman Lebedev2018-07-302-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: C and C++ are interesting languages. They are statically typed, but weakly. The implicit conversions are allowed. This is nice, allows to write code while balancing between getting drowned in everything being convertible, and nothing being convertible. As usual, this comes with a price: ``` unsigned char store = 0; bool consume(unsigned int val); void test(unsigned long val) { if (consume(val)) { // the 'val' is `unsigned long`, but `consume()` takes `unsigned int`. // If their bit widths are different on this platform, the implicit // truncation happens. And if that `unsigned long` had a value bigger // than UINT_MAX, then you may or may not have a bug. // Similarly, integer addition happens on `int`s, so `store` will // be promoted to an `int`, the sum calculated (0+768=768), // and the result demoted to `unsigned char`, and stored to `store`. // In this case, the `store` will still be 0. Again, not always intended. store = store + 768; // before addition, 'store' was promoted to int. } // But yes, sometimes this is intentional. // You can either make the conversion explicit (void)consume((unsigned int)val); // or mask the value so no bits will be *implicitly* lost. (void)consume((~((unsigned int)0)) & val); } ``` Yes, there is a `-Wconversion`` diagnostic group, but first, it is kinda noisy, since it warns on everything (unlike sanitizers, warning on an actual issues), and second, there are cases where it does **not** warn. So a Sanitizer is needed. I don't have any motivational numbers, but i know i had this kind of problem 10-20 times, and it was never easy to track down. The logic to detect whether an truncation has happened is pretty simple if you think about it - https://godbolt.org/g/NEzXbb - basically, just extend (using the new, not original!, signedness) the 'truncated' value back to it's original width, and equality-compare it with the original value. The most non-trivial thing here is the logic to detect whether this `ImplicitCastExpr` AST node is **actually** an implicit conversion, //or// part of an explicit cast. Because the explicit casts are modeled as an outer `ExplicitCastExpr` with some `ImplicitCastExpr`'s as **direct** children. https://godbolt.org/g/eE1GkJ Nowadays, we can just use the new `part_of_explicit_cast` flag, which is set on all the implicitly-added `ImplicitCastExpr`'s of an `ExplicitCastExpr`. So if that flag is **not** set, then it is an actual implicit conversion. As you may have noted, this isn't just named `-fsanitize=implicit-integer-truncation`. There are potentially some more implicit conversions to be warned about. Namely, implicit conversions that result in sign change; implicit conversion between different floating point types, or between fp and an integer, when again, that conversion is lossy. One thing i know isn't handled is bitfields. This is a clang part. The compiler-rt part is D48959. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=21530 | PR21530 ]], [[ https://bugs.llvm.org/show_bug.cgi?id=37552 | PR37552 ]], [[ https://bugs.llvm.org/show_bug.cgi?id=35409 | PR35409 ]]. Partially fixes [[ https://bugs.llvm.org/show_bug.cgi?id=9821 | PR9821 ]]. Fixes https://github.com/google/sanitizers/issues/940. (other than sign-changing implicit conversions) Reviewers: rjmccall, rsmith, samsonov, pcc, vsk, eugenis, efriedma, kcc, erichkeane Reviewed By: rsmith, vsk, erichkeane Subscribers: erichkeane, klimek, #sanitizers, aaron.ballman, RKSimon, dtzWill, filcab, danielaustin, ygribov, dvyukov, milianw, mclow.lists, cfe-commits, regehr Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D48958 llvm-svn: 338288
* [DEBUGINFO] Disable unsupported debug info options for NVPTX target.Alexey Bataev2018-07-273-80/+144
| | | | | | | | | | | | | | | | | | Summary: Some targets support only default set of the debug options and do not support additional debug options, like NVPTX target. Patch introduced virtual function supportsDebugInfoOptions() that can be overloaded by the toolchain, checks if the target supports some debug options and emits warning when an unsupported debug option is found. Reviewers: echristo Subscribers: aprantl, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D49148 llvm-svn: 338155
* [OPENMP] Force OpenMP 4.5 when compiling for offloading.Alexey Bataev2018-07-261-1/+1
| | | | | | | If the user requested compilation for OpenMP with the offloading support, force the version of the OpenMP standard to 4.5 by default. llvm-svn: 338032
* [profile] Support profiling runtime on FuchsiaPetr Hosek2018-07-251-0/+1
| | | | | | | | | | | | | This ports the profiling runtime on Fuchsia and enables the instrumentation. Unlike on other platforms, Fuchsia doesn't use files to dump the instrumentation data since on Fuchsia, filesystem may not be accessible to the instrumented process. We instead use the data sink to pass the profiling data to the system the same sanitizer runtimes do. Differential Revision: https://reviews.llvm.org/D47208 llvm-svn: 337881
* For x86_64, gcc 7.2 under Amazon Linux AMI sets its path to x86_64-amazon-linux.Jiading Gai2018-07-241-1/+2
| | | | | | | | | | | | | | | gcc 7.2 under Amazon Linux AMI sets its paths to x86_64-amazon-linux. Adding this triple to the list of search, plus a test case to cover this. The patch fixes the following bug reported in bugzilla: https://bugs.llvm.org/show_bug.cgi?id=35992 Reviewers: echristo Differential Revision: https://reviews.llvm.org/D46230 llvm-svn: 337811
* [HIP] pass -target-cpu when running the device-mode compilerYaxun Liu2018-07-241-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D49643 llvm-svn: 337793
* Enable .hip files for test/DriverYaxun Liu2018-07-241-2/+2
| | | | | | Partially revert r334128 due to regressions. llvm-svn: 337791
* Revert "[OPENMP] Fix PR38026: Link -latomic when -fopenmp is used."Jonas Hahnfeld2018-07-231-5/+1
| | | | | | | | | | | | This reverts commit r336467: libatomic is not available on all Linux systems and this commit completely breaks OpenMP on them, even if there are no atomic operations or all of them can be lowered to hardware instructions. See http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180716/234816.html for post-commit discussion. llvm-svn: 337722
* [DebugInfo] Error out when enabling -fdebug-types-section on non-ELF target.Jonas Devlieghere2018-07-231-0/+5
| | | | | | | | | | | Currently, support for debug_types is only present for ELF and trying to pass -fdebug-types-section for other targets results in a crash in the backend. Until this is fixed, we should emit a diagnostic in the front end when the option is passed for non-linux targets. Differential revision: https://reviews.llvm.org/D49594 llvm-svn: 337717
* OpenBSD/arm has switched to float ABI SoftFP.Brad Smith2018-07-221-1/+1
| | | | llvm-svn: 337660
* [Driver] Sanitizer support based on runtime library presenceGeorge Karpenkov2018-07-202-23/+65
| | | | | | | | | | | | | | | The runtime libraries of sanitizers are built in compiler-rt, and Clang can be built without compiler-rt, or compiler-rt can be configured to only build certain sanitizers. The driver should provide reasonable diagnostics and not a link-time error when a runtime library is missing. This patch changes the driver for OS X to only support sanitizers of which we can find the runtime libraries. The discussion for this patch explains the rationale Differential Revision: https://reviews.llvm.org/D15225 llvm-svn: 337635
* AMDGPU: Switch default dwarf version to 2Konstantin Zhuravlyov2018-07-201-1/+1
| | | | | | | | | There were some problems unearthed with version 5, which I am going to look at. Differential Revision: https://reviews.llvm.org/D49613 llvm-svn: 337612
* Change \t to spacesFangrui Song2018-07-203-3/+3
| | | | llvm-svn: 337530
* [clang]: Add support for "-fno-delete-null-pointer-checks"Manoj Gupta2018-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Support for this option is needed for building Linux kernel. This is a very frequently requested feature by kernel developers. More details : https://lkml.org/lkml/2018/4/4/601 GCC option description for -fdelete-null-pointer-checks: This Assume that programs cannot safely dereference null pointers, and that no code or data element resides at address zero. -fno-delete-null-pointer-checks is the inverse of this implying that null pointer dereferencing is not undefined. This feature is implemented in as the function attribute "null-pointer-is-valid"="true". This CL only adds the attribute on the function. It also strips "nonnull" attributes from function arguments but keeps the related warnings unchanged. Corresponding LLVM change rL336613 already updated the optimizations to not treat null pointer dereferencing as undefined if the attribute is present. Reviewers: t.p.northover, efriedma, jyknight, chandlerc, rnk, srhines, void, george.burgess.iv Reviewed By: jyknight Subscribers: drinkcat, xbolva00, cfe-commits Differential Revision: https://reviews.llvm.org/D47894 llvm-svn: 337433
* Re-land r337333, "Teach Clang to emit address-significance tables.",Peter Collingbourne2018-07-181-0/+5
| | | | | | | | | | | | | | | | | | | | | which was reverted in r337336. The problem that required a revert was fixed in r337338. Also added a missing "REQUIRES: x86-registered-target" to one of the tests. Original commit message: > Teach Clang to emit address-significance tables. > > By default, we emit an address-significance table on all ELF > targets when the integrated assembler is enabled. The emission of an > address-significance table can be controlled with the -faddrsig and > -fno-addrsig flags. > > Differential Revision: https://reviews.llvm.org/D48155 llvm-svn: 337339
* Revert r337333, "Teach Clang to emit address-significance tables."Peter Collingbourne2018-07-171-5/+0
| | | | | | | | | Causing multiple failures on sanitizer bots due to TLS symbol errors, e.g. /usr/bin/ld: __msan_origin_tls: TLS definition in /home/buildbots/ppc64be-clang-test/clang-ppc64be/stage1/lib/clang/7.0.0/lib/linux/libclang_rt.msan-powerpc64.a(msan.cc.o) section .tbss.__msan_origin_tls mismatches non-TLS reference in /tmp/lit_tmp_0a71tA/mallinfo-3ca75e.o llvm-svn: 337336
* Teach Clang to emit address-significance tables.Peter Collingbourne2018-07-171-0/+5
| | | | | | | | | | | By default, we emit an address-significance table on all ELF targets when the integrated assembler is enabled. The emission of an address-significance table can be controlled with the -faddrsig and -fno-addrsig flags. Differential Revision: https://reviews.llvm.org/D48155 llvm-svn: 337333
* clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.Nico Weber2018-07-172-2/+5
| | | | | | | | | | | | | | | | | Wmsvc-not-found was added in r297851 to help diagnose why link.exe can't be executed. However, it's emitted even when using -fuse-ld=lld, and in cross builds there's no way to get rid of the warning other than disabling it. Instead, emit it when we look up link.exe and it ends up not being executable. That way, when passing -fuse-ld=lld it will never be printed. It will also not be printed if we find link.exe on PATH. (We might want to eventually default to lld one day, at least when running on a non-Win host, but that's for another day.) Fixes PR38016. llvm-svn: 337290
* For NetBSD, unwind data is emitted by default, so also enable frameJoerg Sonnenberger2018-07-171-0/+4
| | | | | | pointer optimisation by default when using optimisation. llvm-svn: 337274
* [Driver] Add -fno-digraphsJacob Bandes-Storch2018-07-171-0/+1
| | | | | | | | | | | | | | Summary: Add a flag `-fno-digraphs` to disable digraphs in the lexer, similar to `-fno-operator-names` which disables alternative names for C++ operators. Reviewers: rsmith Reviewed By: rsmith Subscribers: rsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D48266 llvm-svn: 337232
* Support linking static PIE binaries on NetBSDJoerg Sonnenberger2018-07-121-0/+4
| | | | llvm-svn: 336947
* [mips] Add '-mvirt', '-mno-virt', '-mginv', '-mno-ginv' optionsVladimir Stefanovic2018-07-111-0/+4
| | | | | | | | | '-mvirt'/'-mno-virt' enables/disables Virtualization ASE. '-mginv'/'-mno-ginv' enables/disables GINV (Global Invalidate) ASE. Differential revision: https://reviews.llvm.org/D48982 llvm-svn: 336798
* Fix a typo/regression in r335495.John Baldwin2018-07-101-1/+1
| | | | | | | | | | | Use getTriple.isMIPS64() to detect 64-bit MIPS ABIs in FreeBSD::getSupportedSanitizers() instead of getTriple.isMIPS32(). Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D49143 llvm-svn: 336710
* Support -fdebug-prefix-map for assembler source (pass to cc1as). ThisPaul Robinson2018-07-101-8/+15
| | | | | | | | | | | is useful to omit the debug compilation dir when compiling assembly files with -g. Part of PR38050. Patch by Siddhartha Bagaria! Differential Revision: https://reviews.llvm.org/D48989 llvm-svn: 336685
* [MinGW] Skip adding default win32 api libraries if -lwindowsapp is specifiedMartin Storsjo2018-07-101-8/+20
| | | | | | | | | | | | | | | | | In this setup, skip adding all the default windows import libraries, if linking to windowsapp (which replaces them, when targeting the windows store/UWP api subset). With GCC, the same is achieved by using a custom spec file, but since clang doesn't use spec files, we have to allow other means of overriding what default libraries to use (without going all the way to using -nostdlib, which would exclude everything). The same approach, in detecting certain user specified libraries and omitting others from the defaults, was already used in SVN r314138. Differential Revision: https://reviews.llvm.org/D49059 llvm-svn: 336655
* [MinGW] Treat any -lucrt* as replacing -lmsvcrtMartin Storsjo2018-07-101-1/+1
| | | | | | | | | | | | | | Since SVN r314138, we check if the user has specified any particular alternative msvcrt/ucrt version, and skip the default -lmsvcrt in those cases. In addition to the existing names checked, we should also treat a plain -lucrt in the same way, mingw-w64 has now added a separate import library named libucrt.a, in addition to libucrtbase.a. Differential Revision: https://reviews.llvm.org/D49054 llvm-svn: 336654
* Added -fcrash-diagnostics-dir flagBob Haarman2018-07-091-5/+20
| | | | | | | | | | | | | | | | | | Summary: New flag causes crash reports to be written in the specified directory rather than the temp directory. Patch by Chijioke Kamanu. Reviewers: hans, inglorion, rnk Reviewed By: hans Subscribers: zturner, hiraditya, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D48601 llvm-svn: 336604
* [MachineOutliner] Properly pass -moutline along to the toolchainJessica Paquette2018-07-062-9/+13
| | | | | | | | | | This moves the LTO-specific code for outlining from ToolChains/Clang.cpp to ToolChains/Darwin.cpp. Passing -mllvm flags isn't sufficient for making sure that the specified pass will actually run in LTO. This makes sure that when -moutline is passed, the MachineOutliner will actually be added to the LTO pass pipeline as expected. llvm-svn: 336471
* [OPENMP] Fix PR38026: Link -latomic when -fopenmp is used.Alexey Bataev2018-07-061-1/+5
| | | | | | | On Linux atomic constructs in OpenMP require libatomic library. Patch links libatomic when -fopenmp is used. llvm-svn: 336467
* [Driver,AArch64] Add support for -mcpu=native.Florian Hahn2018-07-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patches adds support for passing -mcpu=native for AArch64. It will get turned into the host CPU name, before we get the target features. CPU = native is handled in a similar fashion in getAArch64MicroArchFetauresFromMtune and getAArch64TargetCPU already. Having a good test case for this is hard, as it depends on the host CPU of the machine running the test. But we can check that native has been replaced with something else. When cross-compiling, we will get a CPU name from the host architecture and get ` the clang compiler does not support '-mcpu=native'` as error message, which seems reasonable to me. Reviewers: rengolin, peter.smith, dlj, javed.absar, t.p.northover Reviewed By: peter.smith Tags: #clang Differential Revision: https://reviews.llvm.org/D48931 llvm-svn: 336429
* [clang-cl, PCH] Implement support for MS-style PCH through headersErich Keane2018-07-052-83/+19
| | | | | | | | | | | | | | | | | | | | | Implement support for MS-style PCH through headers. This enables support for /Yc and /Yu where the through header is either on the command line or included in the source. It replaces the current support the requires the header also be specified with /FI. This change adds a -cc1 option -pch-through-header that is used to either start or stop compilation during PCH create or use. When creating a PCH, the compilation ends after compilation of the through header. When using a PCH, tokens are skipped until after the through header is seen. Patch By: mikerice Differential Revision: https://reviews.llvm.org/D46652 llvm-svn: 336379
* [mips] Add '-mcrc', '-mno-crc' options to enable/disable CRC ASEVladimir Stefanovic2018-07-051-0/+2
| | | | | | | | | '-mcrc' is shared with ARM. '-mno-crc' is Mips-only (ARM uses '-mnocrc'). Differential revision: https://reviews.llvm.org/D48169 llvm-svn: 336347
* Fix crash in clang.Zachary Turner2018-07-031-1/+3
| | | | | | | | | | This happened during a recent refactor. toStringRefArray() returns a vector<StringRef>, which was being implicitly converted to an ArrayRef<StringRef>, and then the vector was immediately being destroyed, so the ArrayRef<> was losing its backing storage. Fix this by making sure the vector gets permanent storage. llvm-svn: 336219
* [Driver] Add PPC64 as supported for ScudoKostya Kortchinsky2018-07-031-1/+2
| | | | | | | | | | | | | | | | | | Summary: Scudo works on PPC64 as is, so mark the architecture as supported for it. This will also require a change to config-ix.cmake on the compiler-rt side. Update the tests accordingly. Reviewers: eugenis, alekseyshl Reviewed By: alekseyshl Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48833 llvm-svn: 336202
* [Driver][Darwin] Use Host Triple to infer target os versionSteven Wu2018-07-031-1/+7
| | | | | | | | | | | | | | | | | | | | Summary: When clang required to infer target os version from --target option and the os version is not specified in targets, check the host triple. If the host and target are both macOS, use host triple to infer target os version. rdar://problem/41651999 Reviewers: arphaman, dexonsmith Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48849 llvm-svn: 336168
* Driver: Don't mix system tools with devtoolset tools on RHELTom Stellard2018-06-301-0/+9
| | | | | | | | | | | | | | | | | Summary: On RHEL, devtoolset provides a more up-to-date toolchain than the base install, and we want to make sure all the tools use are from the same toolchain. Reviewers: rsmith, bruno Reviewed By: bruno Subscribers: bruno, cfe-commits Differential Revision: https://reviews.llvm.org/D34848 llvm-svn: 336037
* Request init/fini array on FreeBSD 12 and laterDimitry Andric2018-06-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems a bad idea to change the default in the middle of a release branch due to possible changes in global ctor / dtor ordering between .ctors and .init_array. With FreeBSD 11.0's release imminent lets change the default now for FreeBSD 12 (the current development stream) and later. FreeBSD rtld has supported .init_array / .fini_array for many years. As of Jan 1 2017 all supported FreeBSD releases and branches will have support. Reviewers: dim, brooks, arichardson Reviewed By: dim, brooks, arichardson Subscribers: bsdjhb, krytarowski, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D24867 llvm-svn: 336008
* [mips][ias] Enable IAS by default for OpenBSD / FreeBSD mips64/mips64el.Brad Smith2018-06-291-4/+6
| | | | | | | | Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D48515 llvm-svn: 336004
* [MachineOutliner] Make -mno-outline use -enable-machine-outliner=neverJessica Paquette2018-06-291-15/+22
| | | | | | | | This updates -mno-outline so that it passes -enable-machine-outliner=never instead of nothing. This puts it in sync with the behaviour in llc and other tools. llvm-svn: 336001
OpenPOWER on IntegriCloud