aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver
AgeCommit message (Collapse)Author
2010-10-21Reorganize predefined macros for all Windows targets.Michael J. Spencer
This adds an option to set the _MSC_VER macro without recompiling. This is very useful when testing compatibility with the Windows SDK and c++stdlib headers. -fmsc-version=<version> (defaults to VS2003 (1300)) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116999 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21Fix Whitespace.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20Add support for the '--sysroot' flag, and an accompanying test of itsChandler Carruth
interactions with -isysroot and other driver commands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116912 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19Use CLANG_RESOURCE_DIR define if one is provided, otherwise use the default ofChandler Carruth
'../lib/clang/<version>'. Actually use '..' rather than removing the trailing component to correctly handle paths containing '.' or symlinks in the presence of -no-canonical-prefixes, etc. This shouldn't change any existing behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116803 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-18Driver: Reject -fasm-blocks except on X86 (where we just ignore it, sinceDaniel Dunbar
passing it is very prevalent in some circles). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-18Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -cDaniel Dunbar
-Wa,-force_cpusubtype_ALL t.c'. - Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of arguments and give an obvious unsupported error on others. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-18Driver/Darwin: Forward -ObjC when linking, which may be needed when using staticDaniel Dunbar
libraries with Objective-C code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116758 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-15Driver: Error on -fno-for-scope, which we have no intention of supporting.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116627 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-15Revert r116605, a lot more were committed by mistake.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-15Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116605 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-14Wire up the -fstrict-aliasing and -fno-strict-aliasing optionsDan Gohman
to CodeGenOption flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11Driver/Darwin: Remove a useless warning about missing runtime libraries. TheseDaniel Dunbar
are almost never needed, so the warning isn't very useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116263 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11Eliminate -fdiagnostics-binary and all of the infrastructure forDouglas Gregor
emitting diagnostics in a binary form to be consumed by libclang, since libclang no longer does any of its work out-of-process, making this code dead. Besides, this stuff never worked at 100% anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116250 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11Declare argv parameters as const char* const* instead of to char** to ↵Axel Naumann
clarify that they are not modified, and to allow for string literals as arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116200 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-10lib/Driver/Tools.cpp: Disable cxa_atexit by default also on Cygwin.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-08Implement -fshort-enums (rdar://8490496).Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-06Teach the driver to pass -fexceptions in Objective-C inputs on ARM.John McCall
I don't know when this stopped happening, but this seems to be the right place to do it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115730 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Introduce -flimit-debug-info.Devang Patel
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-30Driver: Ignore the found PCH file if its '-include' is not the first one.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-25Driver/Linux: Translate rewritten lib options back to standard -l form whenDaniel Dunbar
using generic GCC tools. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-24Driver: Add -fallow-unsupported which disables some of the eager error'ing we doDaniel Dunbar
to prevent users from trying unsupported stuff. Useful for testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114749 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-24Revert r114712 due to failure on darwin buildbot.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114713 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23Make -M/-MM behave like in gcc; use -MF first then -o else use stdout.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23Fix header comment so we don't break emacs.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-23If -fcolor-diagnostics is explicitly passed to the driver respect that even ↵Argyrios Kyrtzidis
if the driver is of the opinion that stderr can't handle them. (see http://llvm.org/PR8150) Patch by Frits van Bommel! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-22Driver/Darwin: Add a runtime library just for ___eprintf -- when targeting i386Daniel Dunbar
some projects still depend on ___eprintf being available. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-20Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actuallyDaniel Dunbar
document behavior. Will wonders never cease. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114334 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver: implement driver automagic support for -lcc_kextShantonu Sen
Rewrite linker arguments to use libclang_rt.cc_kext.a instead of gcc-specific libcc_kext.a Resolves Radar 7808495 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Add a -ftrapv-handler= option which allows a handler to invoke instead of ↵David Chisnall
simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114192 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver/DarwinClang: Add GCC libexec paths so we can find the cc1 binaries if weDaniel Dunbar
ever use fallback. - Not necessary for clang as a compiler, but useful for testing purposes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Reapply "Driver/Darwin: Time for another spin at switching to the DarwinClang",Daniel Dunbar
now that eprintf symbol issue is resolved. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114166 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Revert "Driver/Darwin: Time for another spin at switching to the DarwinClangDaniel Dunbar
toolchain.", while I investigate the totally non-surprising ensuing breakage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver: Support -dumpmachine.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver/Darwin: Time for another spin at switching to the DarwinClang toolchain.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver/DarwinClang: The new toolchain definition is going to drop the -L insideDaniel Dunbar
the GCC dir. Unfortunately, this breaks -lstdc++ on SnowLeopard, etc. because the libstdc++ dylib was hiding there. Workaround this by providing the path to the right -lstdc++.6 (the only version used in recent memory) if we can't see an obvious -lstdc++, but can find = -lstdc++.6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114146 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver: Add magic handling for "reserved library names", starting withDaniel Dunbar
-lstdc++. This is the best gross solution for a gross problem. This issue is that historically, GCC has add -L options to its internally library directories. This has allowed users and platforms to end up depending on the layout of GCC's internal library directories. We want to correct this mistake by eliminating that -L, but this means that existing libraries which are in the GCC lib dir won't be found. We are going to handle this by treating those -l names as "reserved", and requiring toolchains to know how to add the right full path to the reserved library. The immediately side effect of this is that users trying to use -L to find their own -lstdc++ will need to start using -nostdlib (which is a good idea anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the "right" thing, for curious definitions of right. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114144 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver: Factor out AddLinkerInputs() function.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-17Driver: Add a toolchain hook for whether the system has native LLVM support.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-15Make the new -fobjc-nonfragile-abi2 the defaultFariborz Jahanian
abi for clang's objective-c compilations. (radar 8353555). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113974 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14Driver: Add a -stdlib= argument which can be used to select the C++ standardDaniel Dunbar
library to use. - This is currently useful for testing libc++; you can now use 'clang++ -stdlib=libc++ t.cpp' to compile using it if installed. - In the future could also be used to select other standard library choices if alternatives become available (for example, to use an alternate C library). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113891 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14Driver: Factor out some code for handling the C++ standard library.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113890 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14Simplify.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer
instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11Disable cxa_atexit by default on MingW.Anton Korobeynikov
Patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113683 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer
of whatever we were using before... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09Driver/Darwin: Make the compilation object available in AddLinkArgs.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113549 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09Driver: Mark function as nounwind when -mkernel or -fapple-kext is present.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09Clean up CMake dependenciesDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8