llvm-project/clang/lib/Driver
Eric Christopher 74a7c5dc16 The Clang gcc-compatible driver (clang/tools/driver/driver.cpp) has some
logic to select an alternate target based on the executable it was
called as. For instance, if you symlink i686-linux-android-gcc to clang
and invoke it, the driver will act as though it were called with another
argument ("-target i686-linux-android"). This leads to visible effects
even in syntax-only compilations (like the ANDROID preprocessor symbol
being defined).

This behavior is not replicated for tool invocations--for instance,
clang::createInvocationFromCommandLine will not choose an alternate
target based on ArgList[0]. This means that configurations stored in
compilation databases aren't accurately replayed.

This patch separates the logic for selecting a mode flag and target from
the executable name into a new member function on ToolChain. It should
have no functional effects (but will allow other code to reuse the
target/mode selection logic).

Patch by Luke Zarko!

llvm-svn: 248592
2015-09-25 17:44:31 +00:00
..
Action.cpp Augmented CudaHostAction to carry device-side triple. 2015-09-22 17:23:13 +00:00
CMakeLists.txt Support mingw-w64 and mingw.org toolchains at any install location. 2015-07-02 04:45:27 +00:00
Compilation.cpp Driver: Remove the Job class. NFC 2015-07-02 22:52:08 +00:00
CrossWindowsToolChain.cpp Pedantically rename all Tool subclasses to be nouns, not verbs. NFC 2015-06-23 20:42:09 +00:00
Driver.cpp Revert "This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." 2015-09-25 16:11:00 +00:00
DriverOptions.cpp Remove the SUPPORT_ALIASARGS define 2013-08-01 00:12:13 +00:00
InputInfo.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00
Job.cpp Driver: Strip -header-include-file and -diagnostic-log-file from crash repro scripts 2015-08-05 23:49:44 +00:00
MSVCToolChain.cpp [Driver] Add support for Windows 10 SDK 2015-09-24 05:16:36 +00:00
Makefile
MinGWToolChain.cpp Driver: Fix include directories when not using libgcc under mingw 2015-08-13 15:41:04 +00:00
Multilib.cpp [multilib] Turn virtual functor into functin_ref 2015-03-22 15:56:12 +00:00
Phases.cpp Reapply "Change -save-temps to emit unoptimized bitcode files." 2014-12-21 07:00:00 +00:00
SanitizerArgs.cpp Do not include default sanitizer blacklists into -M/-MM/-MD/-MMD output. 2015-09-02 20:02:38 +00:00
Tool.cpp Teach Clang how to use response files when calling other tools 2014-09-15 17:45:39 +00:00
ToolChain.cpp The Clang gcc-compatible driver (clang/tools/driver/driver.cpp) has some 2015-09-25 17:44:31 +00:00
ToolChains.cpp Revert "This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." 2015-09-25 16:11:00 +00:00
ToolChains.h Revert "This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." 2015-09-25 16:11:00 +00:00
Tools.cpp Revert "This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." 2015-09-25 16:11:00 +00:00
Tools.h Revert "This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler." 2015-09-25 16:11:00 +00:00
Types.cpp [cuda] Driver changes to compile and stitch together host and device-side CUDA code. 2015-07-13 23:27:56 +00:00