hanchenye-llvm-project/clang/tools/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
..
CMakeLists.txt Add msbuild-bin/cl to CLANG_LINKS_TO_CREATE 2015-09-21 22:44:57 +00:00
Info.plist.in
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
cc1_main.cpp Make the clang module container format selectable from the command line. 2015-07-17 01:19:54 +00:00
cc1as_main.cpp Pass the relocation model to LLVM for assembler files. 2015-09-18 11:13:43 +00:00
driver.cpp The Clang gcc-compatible driver (clang/tools/driver/driver.cpp) has some 2015-09-25 17:44:31 +00:00