summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* Mark tests from r361278 as unsupported on Windows.Russell Gallop2019-05-223-0/+6
| | | | llvm-svn: 361374
* [Driver][Windows] Add dependent lib argument for -fprofile-generate and ↵Russell Gallop2019-05-221-4/+8
| | | | | | | | | | -fcs-profile-generate Follows on from r360674 which added it for -fprofile-instr-generate. Differential Revision: https://reviews.llvm.org/D62200 llvm-svn: 361368
* [Driver] Verify GCCInstallation is validNick Desaulniers2019-05-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Values returned by GCCInstallation.getParentLibPath() and GCCInstallation.getTriple() are not valid unless GCCInstallation.isValid() returns true. This has previously been ignored, and the former two values were used without checking whether GCCInstallation is valid. This led to the bad path "/../bin" being added to the list of program paths. author: danielmentz "Daniel Mentz <danielmentz@google.com>" Reviewers: #clang, tstellar, srhines Reviewed By: srhines Subscribers: danielmentz, ormris, nickdesaulniers, srhines, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57930 llvm-svn: 361314
* Let -static-pie win if it is specified along with -pie or -static.Siva Chandra2019-05-211-0/+33
| | | | | | | | Also, disallow specifying -no-pie/-nopie along with -static-pie. Differential Revision: https://reviews.llvm.org/D59841 llvm-svn: 361312
* Fix test failures after r361278 on non-Darwin platforms and whenRichard Smith2019-05-212-4/+6
| | | | | | CLANG_DEFAULT_STDLIB is defined to libstdc++. llvm-svn: 361301
* [clang][Darwin] Refactor header search path logic into the driverLouis Dionne2019-05-2130-9/+278
| | | | | | | | | | | | | | | | | | | | | | | Summary: This commit moves the logic for determining system, resource and C++ header search paths from CC1 to the driver. This refactor has already been made for several platforms, but Darwin had been left behind. This refactor tries to implement the previous search path logic with perfect accuracy. In particular, the order of all include paths inside CC1 and all paths that were skipped because nonexistent are conserved after the refactor. This change was also tested against a code base of significant size and revealed no problems. Reviewers: jfb, arphaman Subscribers: nemanjai, javed.absar, kbarton, christof, jkorous, dexonsmith, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61963 llvm-svn: 361278
* Fix test not to use UNSUPPORTED as a FileCheck prefix.Paul Robinson2019-05-201-6/+6
| | | | | | It was not causing a problem but it's not good practice. llvm-svn: 361161
* [AVR] Automatically link CRT and libgcc from the system avr-gccDylan McKay2019-05-193-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch modifies the AVR toolchain so that if avr-gcc and avr-libc are detected during compilation, the CRT, libgcc, libm, and libc anre linked. This matches avr-gcc's default behaviour, and the expected behaviour of all C compilers - including the C runtime. avr-gcc also needs a -mmcu specified in order to link runtime libraries. The difference betwen this patch and avr-gcc is that this patch will warn users whenever they compile without a runtime, as opposed to GCC, which silently trims the runtime libs from the linker arguments when no -mmcu is specified. Reviewers: aaron.ballman, kparzysz, asb, hfinkel, brucehoult, TimNN Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D54334 llvm-svn: 361116
* ftime-trace as a CoreOptionAlexandre Ganea2019-05-161-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D61945 llvm-svn: 360907
* [Driver][Windows] Add dependent lib argument for profile instr generateRussell Gallop2019-05-142-1/+15
| | | | | | | | | | This is needed so lld-link can find clang_rt.profile when self hosting on Windows with PGO. Using clang-cl as a linker knows to add the library but self hosting, using -DCMAKE_LINKER=<...>/lld-link.exe doesn't. Differential Revision: https://reviews.llvm.org/D61742 llvm-svn: 360674
* Add a new language mode for C2x; enable [[attribute]] support by default in C2x.Aaron Ballman2019-05-141-0/+2
| | | | llvm-svn: 360667
* [AMDGPU] gfx1010 clang targetStanislav Mekhanoshin2019-05-133-0/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D61875 llvm-svn: 360634
* Fix test to use -cc1.Leonard Chan2019-05-121-12/+0
| | | | llvm-svn: 360548
* Fix for P41852 where builtin attributes were being caught by ↵Leonard Chan2019-05-121-0/+12
| | | | | | FindLocsWithCommonFileID(). llvm-svn: 360544
* [cc1as] Change -compress-debug-sections= to use --Fangrui Song2019-05-112-8/+8
| | | | | | The double dash form is documented by GNU as, used by gcc, and accepted by llvm-mc. llvm-svn: 360495
* [Darwin] Introduce a new flag, -fapple-link-rtlib that forces linking of the ↵Amara Emerson2019-05-101-0/+6
| | | | | | | | | | | | | | | builtins library. This driver flag is useful when users want to link against the compiler's builtins, but nothing else, and so use flags like -nostdlib. Darwin can't use -nolibc & nostdlib++ like other platforms on because we disable all runtime lib linking with -static, which we still want to have an option to link with the builtins. Differential Revision: https://reviews.llvm.org/D58320 llvm-svn: 360483
* Replace 'REQUIRES: nozlib' with '!zlib' because we don't need two waysPaul Robinson2019-05-101-1/+1
| | | | | | to say the same thing. llvm-svn: 360452
* Replace lit feature keyword 'non-ms-sdk' with 'ms-sdk'; eliminatePaul Robinson2019-05-101-3/+2
| | | | | | 'non-ps4-sdk' and use just 'ps4'. llvm-svn: 360425
* NFC, make XFAIL work on macOS correctly for ↵Alex Lorenz2019-05-091-1/+1
| | | | | | | | | | test/Driver/XRay/xray-instrument-os.c The test 'test/Driver/XRay/xray-instrument-os.c' is supposed to XFAIL on -darwin triples. However, LLVM can be configured to be built with a -macos triple instead, which is equivalent to -darwin. This commit updates the XFAIL condition to also XFAIL with a -macos host triple. llvm-svn: 360374
* [FIX] Change test to read file insteadDiogo N. Sampaio2019-05-091-1/+1
| | | | | | | | This should fix the test file failing in windows by reading the file it self instead of stdin, from 543913c3b41f llvm-svn: 360329
* [ARM] Fix the extensions implied by a cpu nameDiogo N. Sampaio2019-05-091-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When using `clang -mcpu=CPUNAME+FEATURELIST`, the implied features defined by CPUNAME are not obtained, as the entire string is passed. This fixes that by spiting the cpuname string in the first `+`, if any. For example, when using ```clang -### --target=arm-arm-none-eabi -march=armv7-a -mcpu=cortex-a8+nocrc``` the intrinsic ```"target-feature" "+dsp"``` implied by `cortex-a8` is missing. Reviewers: keith.walker.arm, DavidSpickett, carwil Reviewed By: DavidSpickett Subscribers: javed.absar, kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61668 llvm-svn: 360324
* [OpenMP][Clang] Support for target math functionsGheorghe-Teodor Bercea2019-05-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temporary until OpenMP variant is supported by Clang. We intercept the inclusion of math.h and cmath headers and if we are in the OpenMP-NVPTX case, we re-use CUDA's math function resolution mechanism. Authors: @gtbercea @jdoerfert Reviewers: hfinkel, caomhin, ABataev, tra Reviewed By: hfinkel, ABataev, tra Subscribers: JDevlieghere, mgorny, guansong, cfe-commits, jdoerfert Tags: #clang Differential Revision: https://reviews.llvm.org/D61399 llvm-svn: 360265
* Revert "[OpenMP][Clang] Support for target math functions"Jonas Devlieghere2019-05-071-5/+0
| | | | | | | | | | | | | | This commit appears to be breaking stage-2 builds on GreenDragon. The OpenMP wrappers for cmath and math.h are copied into the root of the resource directory and cause a cyclic dependency in module 'Darwin': Darwin -> std -> Darwin. This blows up when CMake is testing for modules support and breaks all stage 2 module builds, including the ThinLTO bot and all LLDB bots. CMake Error at cmake/modules/HandleLLVMOptions.cmake:497 (message): LLVM_ENABLE_MODULES is not supported by this compiler llvm-svn: 360192
* [Clang][NewPM] Don't bail out if the target machine is emptyPetr Hosek2019-05-061-0/+1
| | | | | | | | | | | This matches the behavior of the old pass manager. There are some targets that don't have target machine at all (e.g. le32, spir) which whose tests would never run with new pass manager. Similarly, we would need to disable tests for targets that are disabled. Differential Revision: https://reviews.llvm.org/D58374 llvm-svn: 360100
* [MinGW] Use SEH by default on AArch64Martin Storsjo2019-05-061-2/+2
| | | | | | | | The implementation of SEH is pretty mature at this point. Differential Revision: https://reviews.llvm.org/D61591 llvm-svn: 360081
* [OpenMP][Clang] Support for target math functionsGheorghe-Teodor Bercea2019-05-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: In this patch we propose a temporary solution to resolving math functions for the NVPTX toolchain, temporary until OpenMP variant is supported by Clang. We intercept the inclusion of math.h and cmath headers and if we are in the OpenMP-NVPTX case, we re-use CUDA's math function resolution mechanism. Authors: @gtbercea @jdoerfert Reviewers: hfinkel, caomhin, ABataev, tra Reviewed By: hfinkel, ABataev, tra Subscribers: mgorny, guansong, cfe-commits, jdoerfert Tags: #clang Differential Revision: https://reviews.llvm.org/D61399 llvm-svn: 360063
* Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper ↵Luo, Yuanke2019-05-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Lake Summary: 1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake; 2. Enable intrinsics for VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision. For more details about BF16 intrinsic, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference Patch by LiuTianle Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, spatel, RKSimon Reviewed By: craig.topper Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60552 llvm-svn: 360018
* [Driver] Create non-existent directory for -fcrash-diagnostics-dirPetr Hosek2019-05-041-1/+0
| | | | | | | | | When user specifies non-existent directory to -fcrash-diagnostics-dir, create it rather than failing with an error as would be the case before. Differential Revision: https://reviews.llvm.org/D61542 llvm-svn: 359954
* [CommandLine] Change help output to prefix long options with `--` instead of ↵Don Hinton2019-05-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | `-`. NFC . Part 3 of 5 Summary: By default, `parseCommandLineOptions()` will accept either a `-` or `--` prefix for long options -- options with names longer than a single character. While this change does not affect behavior, it will be helpful with a subsequent change that requires long options use the `--` prefix. Reviewers: rnk, thopre Reviewed By: thopre Subscribers: thopre, cfe-commits, hiraditya, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D61269 llvm-svn: 359909
* [Driver] Explicitly request platform rtlib in the Driver pic testPetr Hosek2019-05-011-3/+3
| | | | | | | | | | | | | This test checks whether crtbegin.o and crtend.o appear on the link line, but names of these files may be affected by the choice of the rtlib, specifically when compiler-rt is used as the default rtlib the names will be clang_rt.crtbegin.o and clang_rt.crtend.o instead of crtbeginS.o and crtendS.o. To avoid the test failure, explicitly request to use the platform rtlib. Differential Revision: https://reviews.llvm.org/D61383 llvm-svn: 359706
* Change llvm-{objdump,readobj} -long-option to --long-option or well-known ↵Fangrui Song2019-05-012-2/+2
| | | | | | short options in tests. NFC llvm-svn: 359662
* [WebAssembly] Use the "wasm32-wasi" triple in testsDan Gohman2019-04-302-12/+12
| | | | | | | | | | | Similar to https://reviews.llvm.org/D61334, update clang tests to use the "wasm32-wasi" triple, removing the "-musl" environment and omitting the "-unknown" vendor. Differential Revision: https://reviews.llvm.org/D61338 Reviewer: sbc100 llvm-svn: 359630
* [Driver] Support compiler-rt crtbegin.o/crtend.o for LinuxPetr Hosek2019-04-305-61/+66
| | | | | | | | | | When compiler-rt is selected as the runtime library for Linux targets use its crtbegin.o/crtend.o implemenetation rather than platform one if available. Differential Revision: https://reviews.llvm.org/D59264 llvm-svn: 359603
* [Fuchsia] Support multilib for -fsanitize=address and -fno-exceptionsPetr Hosek2019-04-273-0/+21
| | | | | | | | | | | | | | | This introduces a support for multilibs to Fuchsia driver. Unlike the existing multilibs that are used primarily for handling different architecture variants, we use multilibs to handle different variants of Clang runtime libraries: -fsanitize=address and -fno-exceptions are the two we support initially. This replaces the existing support for sanitized runtimes libraries that was only used by Fuchsia driver and it also refactors some of the logic to allow sharing between GNU and Fuchsia drivers. Differential Revision: https://reviews.llvm.org/D61040 llvm-svn: 359360
* [clang][driver] Weaken the test from 359353 to appease Windows botsAlex Lorenz2019-04-261-1/+1
| | | | llvm-svn: 359356
* [driver][macOS] Link libarclite from the default toolchain when clangAlex Lorenz2019-04-261-0/+8
| | | | | | | | | | | | | | | is running in a toolchain outside of xcode 'libarclite' usually lives in the same toolchain as 'clang'. However, the Swift open source toolchains for macOS distribute Clang without 'libarclite'. In that case, to allow the linker to find 'libarclite', we point to the 'libarclite' that should be in the XcodeDefault toolchain instead. The path to the toolchain is inferred from the SDK path if it's specified. https://bugs.swift.org/browse/SR-9972 rdar://49947573 llvm-svn: 359353
* Add 'REQUIRES: shell' to verbose-output-quoting.cHans Wennborg2019-04-241-0/+1
| | | | | | The lit shell couldn't handle these run lines. llvm-svn: 359081
* Fix unquoted spaces in args in clang --verbose outputHans Wennborg2019-04-241-0/+9
| | | | | | | | | | | The behaviour of not quoting spaces appears to have been introduced by mistake in r190620. Patch by Brad Moody! Differential revision: https://reviews.llvm.org/D60997 llvm-svn: 359077
* Enable frame pointer elimination for OpenBSD on powerpc.Brad Smith2019-04-191-0/+4
| | | | llvm-svn: 358775
* clang-cl: Parse /openmp:experimentalHans Wennborg2019-04-171-0/+1
| | | | | | | It was added to the MS docs recently here: https://github.com/MicrosoftDocs/cpp-docs/commit/3951085ab722fbb488ca40864f4a0553f7b71855 llvm-svn: 358570
* [Driver] Simplify -g level computation and its interaction with -gsplit-dwarfFangrui Song2019-04-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When -gsplit-dwarf is used together with other -g options, in most cases the computed debug info level is decided by the last -g option, with one special case (see below). This patch drops that special case and thus makes it easy to reason about: // If a lower debug level -g comes after -gsplit-dwarf, in some cases // -gsplit-dwarf is cancelled. -gsplit-dwarf -g0 => 0 -gsplit-dwarf -gline-directives-only => DebugDirectivesOnly -gsplit-dwarf -gmlt -fsplit-dwarf-inlining => 1 -gsplit-dwarf -gmlt -fno-split-dwarf-inlining => 1 + split // If -gsplit-dwarf comes after -g options, with this patch, the net // effect is 2 + split for all combinations -g0 -gsplit-dwarf => 2 + split -gline-directives-only -gsplit-dwarf => 2 + split -gmlt -gsplit-dwarf -fsplit-dwarf-inlining => 2 + split -gmlt -gsplit-dwarf -fno-split-dwarf-inlining => 1 + split (before) 2 + split (after) The last case has been changed. In general, if the user intends to lower debug info level, place that -g option after -gsplit-dwarf. Some context: In gcc, the last of -gsplit-dwarf -g0 -g1 -g2 -g3 -ggdb[0-3] -gdwarf-* ... decides the debug info level (-gsplit-dwarf -gdwarf-* have level 2). It is a bit unfortunate that -gsplit-dwarf -gdwarf-* ... participate in the level computation but that is the status quo. Reviewers: dblaikie, echristo, probinson Reviewed By: dblaikie, probinson Subscribers: probinson, aprantl, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59923 llvm-svn: 358544
* Modify test to use -S instead of -c so that it works when an external ↵Douglas Yung2019-04-161-3/+3
| | | | | | assembler is used that is not present. llvm-svn: 358537
* Tweak test to pass when using a non-integrated assembler.Richard Smith2019-04-161-4/+4
| | | | llvm-svn: 358470
* DebugInfo: Default to standalone debug when tuning for LLDBDavid Blaikie2019-04-161-11/+10
| | | | | | | | | | | | | | | | | LLDB can't currently handle Clang's default (limit/no-standalone) DWARF, so platforms that default to LLDB (Darwin) or anyone else manually requesting LLDB tuning, should also get standalone DWARF. That doesn't mean a user can't explicitly enable (because they have other reasons to prefer standalone DWARF (such as that they're only building half their application with debug info enabled, and half without - or because they're tuning for GDB, but want to be able to use it under LLDB too (this is the default on FreeBSD))) or disable (testing LLDB fixes/improvements that handle no-standalone mode, building C code, perhaps, which wouldn't have the LLDB<>no-standalone conflict, etc) the feature regardless of the tuning. llvm-svn: 358464
* Revert "[clang] Aligned allocation is actually supported in macosx 10.13"Louis Dionne2019-04-151-4/+4
| | | | | | | | This reverts r358409, which I think broke the bots in compiler-rt. Since I'm having trouble reproducing the failure, I'm reverting this until I can investigate locally. llvm-svn: 358437
* [clang] Aligned allocation is actually supported in macosx 10.13Louis Dionne2019-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In r350649, I changed aligned allocation from being available starting in macosx10.13 to macosx10.14. However, aligned allocation is indeed available starting with macosx10.13, my investigation had been based on the wrong libc++abi dylib. This means that Clang before the fix will be more stringent when it comes to aligned allocation -- it will not allow it when back-deploying to macosx 10.13, when it would actually be safe to do so. Note that a companion change will be coming to fix the libc++ tests. Reviewers: ahatanak Subscribers: jkorous, dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60626 llvm-svn: 358409
* [c++20] Enable driver and frontend support for building and usingRichard Smith2019-04-141-0/+74
| | | | | | modules when -std=c++2a is specified. llvm-svn: 358355
* [HIP] Use -mlink-builtin-bitcode to link device libraryYaxun Liu2019-04-123-14/+19
| | | | | | | | | | | | Use -mlink-builtin-bitcode instead of llvm-link to link device library so that device library bitcode and user device code can be compiled in a consistent way. This is the same approach used by CUDA and OpenMP. Differential Revision: https://reviews.llvm.org/D60513 llvm-svn: 358290
* [asan] Add gcc 8's driver option -fsanitize=pointer-compare and ↵Pierre Gousseau2019-04-121-0/+11
| | | | | | | | | | | | -fsanitize=pointer-substract. Disabled by default as this is still an experimental feature. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D59221 llvm-svn: 358285
* Enable frame pointer elimination for OpenBSD on x86 and mips64.Brad Smith2019-04-121-0/+9
| | | | llvm-svn: 358245
OpenPOWER on IntegriCloud