summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Stab in the dark to fix the PS4 botChris Bieneman2016-04-301-0/+3
| | | | | | r268127 is causing the PS4 bots to fail. Not sure what is causing it, but hopefully this will fix it. llvm-svn: 268156
* Fix test case for incompatible sysroot warningChris Bieneman2016-04-291-5/+5
| | | | | | r268127 broke some bots because it needs to specify a darwin target. llvm-svn: 268128
* Add a new warning to notify users of mismatched SDK and deployment targetChris Bieneman2016-04-291-0/+12
| | | | | | | | | | | | | | | Summary: This patch adds a new driver warning -Wincompatible-sdk which notifies the user when they are mismatching the version min options and the sysroot. The patch works by checking the sysroot (if present) for an SDK name, then matching that against the target platform. In the case of a mismatch it logs a warning. Reviewers: bob.wilson, rsmith Subscribers: rsmith, edward-san, cfe-commits Differential Revision: http://reviews.llvm.org/D18088 llvm-svn: 268127
* Re-apply r267784, r267824 and r267830.Peter Collingbourne2016-04-283-16/+17
| | | | | | I have updated the compiler-rt tests. llvm-svn: 267903
* Revert r267784, r267824 and r267830.Benjamin Kramer2016-04-283-17/+16
| | | | | | | | | | It makes compiler-rt tests fail if the gold plugin is enabled. Revert "Rework interface for bitset-using features to use a notion of LTO visibility." Revert "Driver: only produce CFI -fvisibility= error when compiling." Revert "clang/test/CodeGenCXX/cfi-blacklist.cpp: Exclude ms targets. They would be non-cfi." llvm-svn: 267871
* Driver: only produce CFI -fvisibility= error when compiling.Peter Collingbourne2016-04-281-2/+4
| | | | | | | The -fvisibility= flag only affects compile jobs, so there's no need to error out because of it if we aren't compiling (e.g. if we are only linking). llvm-svn: 267824
* Rework interface for bitset-using features to use a notion of LTO visibility.Peter Collingbourne2016-04-273-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitsets, and the compiler features they rely on (vtable opt, CFI), only have visibility within the LTO'd part of the linkage unit. Therefore, only enable these features for classes with hidden LTO visibility. This notion is based on object file visibility or (on Windows) dllimport/dllexport attributes. We provide the [[clang::lto_visibility_public]] attribute to override the compiler's LTO visibility inference in cases where the class is defined in the non-LTO'd part of the linkage unit, or where the ABI supports calling classes derived from abstract base classes with hidden visibility in other linkage units (e.g. COM on Windows). If the cross-DSO CFI mode is enabled, bitset checks are emitted even for classes with public LTO visibility, as that mode uses a separate mechanism to cause bitsets to be exported. This mechanism replaces the whole-program-vtables blacklist, so remove the -fwhole-program-vtables-blacklist flag. Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the support for the special attr:uuid blacklist entry is removed. Differential Revision: http://reviews.llvm.org/D18635 llvm-svn: 267784
* Try to get at_file_missing.c passing after LLVM r267556.Nico Weber2016-04-261-2/+2
| | | | | | | | | | r267556 made backslashes escape the next character unconditionally in rsp files. This test echos a path into a rsp file, and paths contain backslashes on Windows. Since it's not important for this test to get the filename from the rsp file, just pass it regularly. llvm-svn: 267601
* Update test after LLVM r267556.Nico Weber2016-04-262-3/+4
| | | | llvm-svn: 267557
* driver: Add a `--rsp-quoting` flag to pick response file quoting.Nico Weber2016-04-252-0/+47
| | | | | | | | | | | | | | | | | | | | Currently, clang-cl always uses Windows style for unquoting, and clang always uses POSIX style for unquoting. With this flag, it's possible to change these defaults. In general, response file quoting should match the shell the response file is used in. On Windows, it's possible to run clang-cl in a bash shell, or clang in cmd.exe, so a flag for overriding the default behavior is natural there. On non-Windows, Windows quoting probably never makes sense (except maybe in Wine), but having clang-cl behave differently based on the host OS seems strange too. So require that people who want to use posix-style response files with clang-cl on non-Windows pass --rsp-quoting=posix. http://reviews.llvm.org/D19425 llvm-svn: 267474
* Try to get test passing on OS X (see comment at top of file).Nico Weber2016-04-221-2/+2
| | | | llvm-svn: 267089
* [esan] EfficiencySanitizer driver flagsDerek Bruening2016-04-214-0/+54
| | | | | | | | | | | | | | | | Summary: Adds a framework to enable the instrumentation pass for the new EfficiencySanitizer ("esan") family of tools. Adds a flag for esan's cache fragmentation tool via -fsanitize=efficiency-cache-frag. Adds appropriate tests for the new flag. Reviewers: eugenis, vitalybuka, aizatsky, filcab Subscribers: filcab, kubabrecka, llvm-commits, zhaoqin, kcc Differential Revision: http://reviews.llvm.org/D19169 llvm-svn: 267059
* clang-cl: Don't assert on using /Yc with non-source files, PR27450Nico Weber2016-04-211-1/+16
| | | | | | Move phase handling after input type validation. llvm-svn: 267040
* Compilation for Intel MCU (Part 1/3)Andrey Turetskiy2016-04-211-0/+18
| | | | | | | | | | | Add -miamcu option which: * Sets IAMCU triple * Sets IAMCU ABI * Enforces static compilation Differential Revision: http://reviews.llvm.org/D18398 llvm-svn: 266972
* [Clang] Remove unwanted --check-prefix=CHECK from unit tests. NFC.Mandeep Singh Grang2016-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Removed unwanted --check-prefix=CHECK from the following unit tests: test/CXX/special/class.copy/implicit-move-def.cpp test/CodeGen/cleanup-destslot-simple.c test/CodeGen/inline-asm-immediate-ubsan.c test/CodeGen/mips-interrupt-attr.c test/CodeGenCXX/cfi-stats.cpp test/CodeGenCXX/copy-constructor-elim.cpp test/CodeGenCXX/microsoft-templ-uuidof.cpp test/CodeGenCXX/vtable-linkage.cpp test/CodeGenObjC/messages-2.m test/Driver/noinline.c test/Index/remap-load.c test/Index/retain-comments-from-system-headers.c test/OpenMP/task_if_codegen.cpp test/Preprocessor/comment_save_macro.c Patch by: Mandeep Singh Grang (mgrang) Reviewers: rafael, ABataev, rengolin Projects: #clang-c Differential Revision: http://reviews.llvm.org/D19232 llvm-svn: 266843
* MarkEOLs should only be true for clang-cl.exe.Stephen Hines2016-04-202-1/+13
| | | | | | | | | | | | | | | | | | | | | Summary: https://llvm.org/bugs/show_bug.cgi?id=27396 This fixes an issue in response files where "\r\n" was being interpreted as two EOL markers (i.e. we consumed the '\r' as terminating the previous token, and then parsed the '\n' as a significant EOL). This breaks response files where joined arguments get split across multiple lines (like "-x\r\nc"). I also fixed an accidental issue in the response-file.c test, where the response file is appended to, instead of being overwritten. Reviewers: rnk Subscribers: danalbert, llvm-commits Differential Revision: http://reviews.llvm.org/D19289 llvm-svn: 266840
* cc1as: Don't crash when CIE is requested and no DWARF version is specified.Adrian Prantl2016-04-191-0/+37
| | | | | | | | | This patch changes the default DWARF version for cc1as from invalid 0 to 2, which should be the lowest common denominator on all platforms. rdar://problem/24735813 llvm-svn: 266814
* [CUDA] Add a test for r266496 (raise an error if a CUDA installation isn't ↵Justin Lebar2016-04-191-0/+12
| | | | | | found) llvm-svn: 266796
* Pass dwarf-version to cc1as.Douglas Katzman2016-04-191-0/+5
| | | | | | Fix PR26999 - crashing in cc1as with any '*bsd' target. llvm-svn: 266775
* Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few ↵Andrey Turetskiy2016-04-191-21/+0
| | | | | | buildbots. llvm-svn: 266753
* Compilation for Intel MCU (Part 1/3)Andrey Turetskiy2016-04-191-0/+21
| | | | | | | | | | | Add -miamcu option which: * Sets IAMCU triple * Sets IAMCU ABI * Enforces static compilation Differential Revision: http://reviews.llvm.org/D18398 llvm-svn: 266747
* [CUDA] Add --no-cuda-noopt-debug, which disables --cuda-noopt-debug.Justin Lebar2016-04-191-0/+5
| | | | | | | | | | Reviewers: tra Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D19251 llvm-svn: 266708
* [CUDA] Add --cuda-compile-host-device, which overrides --cuda-host-only and ↵Justin Lebar2016-04-192-9/+38
| | | | | | | | | | | | | | | | --cuda-device-only. Summary: This completes the flag's tristate, letting you override it at will on the command line. Reviewers: tra Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D19248 llvm-svn: 266707
* Mark -Xclang as being a compilation-only option so that the clang driverRichard Smith2016-04-181-0/+12
| | | | | | | | | doesn't warn if it's passed to a link action. This matches the behavior for most other compilation-only options (including things like -f flags), and is necessary to suppress warnings on systems like cmake that always pass all compile flags to the linker. llvm-svn: 266695
* [sanitizer-coverage] make sure coverage flags are not passed to clang if the ↵Kostya Serebryany2016-04-181-0/+1
| | | | | | driver thinks they are unused llvm-svn: 266673
* clang-cl: Don't check for existence of linker inputs when /link is usedHans Wennborg2016-04-151-0/+8
| | | | | | | | | There might be flags passed to the linker (e.g. /libpath), causing it to search in paths the Clang driver doesn't know about. PR27234 llvm-svn: 266402
* clang-cl: Make /link accept an optional joined argument.Hans Wennborg2016-04-151-0/+1
| | | | | | | | | | For example, "cl.exe a.c /linkfoo bar" is a valid invocation and forwards "foo" and "bar" to link.exe. This makes clang-cl handle that kind of invocation. Depends on LLVM r266394. llvm-svn: 266395
* Fix testcase for the LLVM_LIBDIR_SUFFIX=64 case. Fallout from r266108.Ismail Donmez2016-04-141-1/+1
| | | | llvm-svn: 266324
* ARM: make Darwin's "-arch armv7em" default to hard-float.Tim Northover2016-04-131-7/+8
| | | | | | | | | | We've already paid the price for separate "armv7m" and "armv7em" slices (support in other tools), it's silly to make them identical other than the default CPU. rdar://23055688 llvm-svn: 266211
* clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.NAKAMURA Takumi2016-04-131-1/+1
| | | | llvm-svn: 266154
* [AMDGPU] Add debugger related target optionsKonstantin Zhuravlyov2016-04-121-0/+21
| | | | | | Differential Revision: http://reviews.llvm.org/D18748 llvm-svn: 266133
* Always use --eh-frame-hdr on FreeBSD, even for -staticEd Maste2016-04-121-0/+1
| | | | | | | | | | | | FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and is expected to use it more widely in the future), and it requires the EH frame segment in static binaries. This is the same as r203742 for NetBSD. Differential Revision: http://reviews.llvm.org/D19029 llvm-svn: 266123
* clang-cl: Remove -isystem, add -imsvc.Nico Weber2016-04-122-5/+6
| | | | | | | | | | | | | | | | | r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of the system include search path. The idea was to use this to point to a hermetic msvc install, but as it turns out this doesn't work: -isystem then adds the hermetic headers in front of clang's builtin headers, and clang's headers that are supposed to wrap msvc headers (say, stdarg.h) aren't picked up at all anymore. So revert that, and instead expose -imsvc which works as if the passed directory was part of %INCLUDE%: The header is treated as a system header, but it is searched after clang's lib/Header headers. Fixes half of PRPR26751. llvm-svn: 266108
* Revert 266090, needs more testing first.Nico Weber2016-04-121-1/+0
| | | | llvm-svn: 266091
* clang-cl: Expose -nostdlibinc.Nico Weber2016-04-121-0/+1
| | | | llvm-svn: 266090
* Allow simultaneous safestack and stackprotector attributes.Evgeniy Stepanov2016-04-111-7/+12
| | | | | | | | | This is the clang part of http://reviews.llvm.org/D18846. SafeStack instrumentation pass adds stack protector canaries if both attributes are present on a function. StackProtector pass will step back if the function has a safestack attribute. llvm-svn: 266005
* Enable PIE for CloudABI.Ed Schouten2016-04-062-4/+4
| | | | | | | | | | | | | | | | | | As we're currently working on making CloudABI executables easier to emulate in userspace (e.g., on OS X and Windows), it makes a whole lot of sense to build these using PIE. By using PIE, they can simply be loaded into the existing process address space without clashes. PIE support got added to CloudABI's C library and seems to work pretty well. CloudABI does not make use of an ld.so, so the binary's _start() has all the logic in it to do the relocations. Now that all but one bug in LLD relating to PIE support have been squashed (and a patch for that is already in code review), I'd like to go ahead and force the use of PIE for Clang 3.9. When released, we'll also switch over to using LLD exclusively. llvm-svn: 265546
* clang-cl: Don't skip i_group flags other than -include when building pchs.Nico Weber2016-04-021-0/+4
| | | | | | | Before this change, e.g. -isystem flags in front of the /FI corresponding to the pch file would be incorrectly ignored. llvm-svn: 265238
* [test] Don't use "UNSUPPORTED" in FileCheck prefixesGreg Parker2016-04-022-8/+8
| | | | | | | lit uses "UNSUPPORTED:" for its own purposes and may be confused if that text appears elsewhere in the test file. llvm-svn: 265218
* [DarwinDriver] Increase the number of valid digits for ld64 version string.Bruno Cardoso Lopes2016-03-311-0/+24
| | | | | | | | | | Previously only 3 digits were valid. Increase it to 5. Differential Revision: http://reviews.llvm.org/D18304 rdar://problem/24843016 llvm-svn: 264987
* Enable the SafeStack sanitizer on CloudABI by default.Ed Schouten2016-03-292-6/+16
| | | | | | | | | | | | | | | | | | | Over the last month we've been testing SafeStack extensively. As far as we know, it works perfectly fine. That why I'd like to see us having this enabled by default for CloudABI. This change introduces a getDefaultSanitizers() function that toolchains can use to specify which sanitizers are enabled by default. Once all flags are processed, only flags that had no -fno-sanitize overrides are enabled. Extend the thests for CloudABI to test both the default case and the case in which we want to explicitly disable SafeStack. Reviewed by: eugenis, pcc Differential Revision: http://reviews.llvm.org/D18505 llvm-svn: 264787
* clang-cl: Silently ignore /d2FastFail flag.Nico Weber2016-03-291-0/+1
| | | | | | It's some debugging flag for cl.exe related to how it writes crash dumps. llvm-svn: 264774
* [AMDGPU] Switch linker to amdphdrs + update testKonstantin Zhuravlyov2016-03-291-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D18253 llvm-svn: 264737
* [lanai] Add Lanai backend to clang driver.Jacques Pienaar2016-03-282-0/+88
| | | | | | | | | | Changes to clang to add Lanai backend. Adds a new target, ABI and toolchain. General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html). Differential Revision: http://reviews.llvm.org/D17002 llvm-svn: 264655
* Modules builds are necessarily compile actions, but they don'tEric Christopher2016-03-241-0/+15
| | | | | | | necessarily produce object files. Turn off split dwarf if we're not producing a file that the driver believes is an object file. llvm-svn: 264227
* clang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes.Nico Weber2016-03-231-6/+3
| | | | | | | | | | Instead of putting the /Yc header into ExtraDeps, give DependencyOutputOptions a dedicated field for /Yc mode, and let HeaderIncludesCallback hang on to the full DependencyOutputOptions object, not just ExtraDeps. Reverts parts of r263352 that are now no longer needed. llvm-svn: 264182
* clang-cl: Add more tests for the interaction of /FI and /Yc /Yu.Nico Weber2016-03-233-0/+29
| | | | | | | | | | | | Most things even work; see the included FIXMEs for things that need polishing. Also don't warn about unused flags for the `/Yuh2.h /FIh1.h /FIh2.h`. The common case is that the pch was built with `/Ych2.h /FIh1.h /FIh2.h`, so h1.h is in the PCH, and we shouldn't warn about /FIh1.h not having an effect. (If we wanted to get fancy, we could store the list of -include flags in the pch and then check that it matches later on.) llvm-svn: 264178
* clang-cl: Include /FI headers in /showIncludes output.Nico Weber2016-03-231-8/+9
| | | | | | | | | | | | | | | | | -H in gcc mode doesn't print -include headers, but they are included in depfiles written by MMD and friends. Since /showIncludes is what's used instead of depfiles, printing /FI there seems important (and matches cl.exe). Instead of giving HeaderIncludeGen more options, just switch on ShowAllHeaders in clang-cl mode and let clang::InitializePreprocessor() not put -include flags in the <command line> block. This changes the behavior of -E slightly, and it removes the <command line> flag from the output triggered by setting the obscure CC_PRINT_HEADERS=1 env var to true while running clang. Both of these seem ok to change. http://reviews.llvm.org/D18401 llvm-svn: 264174
* clang-cl: Don't warn about /Oy- being unused in 64-bit builds.Nico Weber2016-03-231-3/+3
| | | | | | http://reviews.llvm.org/D18392 llvm-svn: 264163
* Revert "Convert some ObjC msgSends to runtime calls."Pete Cooper2016-03-211-7/+0
| | | | | | | | | | | | | | This reverts commit r263607. This change caused more objc_retain/objc_release calls in the IR but those are then incorrectly optimized by the ARC optimizer. Work is going to have to be done to ensure the ARC optimizer doesn't optimize user written RR, but that should land before this change. This change will also need to be updated to take account for any changes required to ensure that user written calls to RR are distinct from those inserted by ARC. llvm-svn: 263984
OpenPOWER on IntegriCloud