summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAge
...
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
* Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652.Anders Carlsson2010-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119915 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver/Darwin: Don't pass -demangle to an iOS linker, which may not understandDaniel Dunbar2010-11-19
| | | | | | it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119809 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Ignore -force_cpusubtype_ALL.Daniel Dunbar2010-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119803 91177308-0d34-0410-b5e6-96231b3b80d8
* -Rename -Wargument-larger-than -> -Wlarge-by-value-copyArgyrios Kyrtzidis2010-11-18
| | | | | | | | | -Improve the diagnostic message -Add some comments Suggestions by Chris. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119594 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce option -Wargument-larger-than[=N] which warns about function ↵Argyrios Kyrtzidis2010-11-17
| | | | | | | | | | definitions if they take by-value or return by-value any POD that is larger than some threshold (default is 64 bytes). Implements rdar://8548050. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119583 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -pie.Rafael Espindola2010-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119577 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't warn aboutRafael Espindola2010-11-17
| | | | | | | clang -w -c foo.s Helps with the gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119574 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't warn about -w not being used in a link. Necessary to get saneRafael Espindola2010-11-17
| | | | | | results in the gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119552 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence warning for "clang -O2 -O0 -c foo.c -o foo.o.Rafael Espindola2010-11-17
| | | | | | Fixes PR8607. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119498 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes PR8611.Rafael Espindola2010-11-15
| | | | | | | | Silence warning about -g not being used during linking. I couldn't find any change in behavior in gcc liking when given -g. Please open another bug if I missed something. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119166 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Support -Oz as an alias for -Os.Daniel Dunbar2010-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119003 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -nostdlib in the linux toolchain.Rafael Espindola2010-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118878 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -s, -pthread and -pthreads. Thanks to Hans Wennborg andRafael Espindola2010-11-11
| | | | | | Cosmin Truta for reporting it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118826 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Allow build system override of default non-fragile ABI version.Daniel Dunbar2010-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118786 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -rdynamic to freebsd and openbsd. Patch by Ruben.Rafael Espindola2010-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118771 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for soft/hard float options to the Sparc targetBruno Cardoso Lopes2010-11-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118514 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -rdynamic.Rafael Espindola2010-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118384 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ld directly on linux. Changes from the previous try:Rafael Espindola2010-11-07
| | | | | | | | | | | | | | | | | *) Try to detect as much as possible from the system itself, not the distro. This should make it easier to port to a new distro and more likely to work on a unknown one. *) The distro enum now doesn't include the arch. Just use the existing host detection support in LLVM. *) Correctly handle --sysroot. A small regression is that now clang will pass bitcode file to the linker. This is necessary for the gold plugin support to work. It might be better to detect this at configure/cmake time, but doing it in c++ first is a lot easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118382 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -working-directory.Argyrios Kyrtzidis2010-11-03
| | | | | | | | | | | | | | | | | | | When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along. --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism. FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions. Addresses rdar://8583824. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert while I debug test failures :-(Rafael Espindola2010-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118150 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch clang to run ld directly on linux. I tested this on all the linuxRafael Espindola2010-11-03
| | | | | | | | | | | | | | | | | | | | | | distros listed by running gcc main.o -o main g++ main.o -o main gcc main.o -o main -static g++ main.o -o main -static gcc f.o -o f.so -shared g++ f.o -o f.so -shared and comparing the ld line with the one created by clang. I also added -m32/m64 in distros that support it. While I tested many distros, there will always be more. If you are hit by this it should be somewhat easy to add your distro. If you are in a hurry, do revert this, but please inform how to detect you distro and the ld command lines produced by the above gcc invocations. Most distros have some patches on gcc :-( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118149 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Silently ignore -fasm-blocks for now instead of error'ing, this causeDaniel Dunbar2010-11-02
| | | | | | some unexpected fallout. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118037 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver/IA: Ignore -L for now, which users shouldn't be using for semantic ↵Daniel Dunbar2010-10-28
| | | | | | effect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorganize predefined macros for all Windows targets.Michael J. Spencer2010-10-21
| | | | | | | | | | 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
* Fix Whitespace.Michael J. Spencer2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116990 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the '--sysroot' flag, and an accompanying test of itsChandler Carruth2010-10-20
| | | | | | | interactions with -isysroot and other driver commands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116912 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Reject -fasm-blocks except on X86 (where we just ignore it, sinceDaniel Dunbar2010-10-18
| | | | | | 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
* Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -cDaniel Dunbar2010-10-18
| | | | | | | | -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
* Driver/Darwin: Forward -ObjC when linking, which may be needed when using staticDaniel Dunbar2010-10-18
| | | | | | libraries with Objective-C code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116758 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Error on -fno-for-scope, which we have no intention of supporting.Daniel Dunbar2010-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116627 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r116605, a lot more were committed by mistake.Argyrios Kyrtzidis2010-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116606 91177308-0d34-0410-b5e6-96231b3b80d8
* Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.Argyrios Kyrtzidis2010-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116605 91177308-0d34-0410-b5e6-96231b3b80d8
* Wire up the -fstrict-aliasing and -fno-strict-aliasing optionsDan Gohman2010-10-14
| | | | | | | to CodeGenOption flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116530 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate -fdiagnostics-binary and all of the infrastructure forDouglas Gregor2010-10-11
| | | | | | | | | 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
* lib/Driver/Tools.cpp: Disable cxa_atexit by default also on Cygwin.NAKAMURA Takumi2010-10-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116161 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -fshort-enums (rdar://8490496).Argyrios Kyrtzidis2010-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the driver to pass -fexceptions in Objective-C inputs on ARM.John McCall2010-10-06
| | | | | | | | | 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
* Introduce -flimit-debug-info.Devang Patel2010-09-30
| | | | | | | 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
* Driver: Ignore the found PCH file if its '-include' is not the first one.Argyrios Kyrtzidis2010-09-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115158 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver/Linux: Translate rewritten lib options back to standard -l form whenDaniel Dunbar2010-09-25
| | | | | | using generic GCC tools. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114793 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Add -fallow-unsupported which disables some of the eager error'ing we doDaniel Dunbar2010-09-24
| | | | | | 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
* Fix header comment so we don't break emacs.Nick Lewycky2010-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114711 91177308-0d34-0410-b5e6-96231b3b80d8
* If -fcolor-diagnostics is explicitly passed to the driver respect that even ↵Argyrios Kyrtzidis2010-09-23
| | | | | | | | | 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
* Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actuallyDaniel Dunbar2010-09-20
| | | | | | document behavior. Will wonders never cease. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114334 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: implement driver automagic support for -lcc_kextShantonu Sen2010-09-17
| | | | | | | | | | 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
* Add a -ftrapv-handler= option which allows a handler to invoke instead of ↵David Chisnall2010-09-17
| | | | | | 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
* Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.Daniel Dunbar2010-09-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114147 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Add magic handling for "reserved library names", starting withDaniel Dunbar2010-09-17
| | | | | | | | | | | | | | | | | | | | -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
* Driver: Factor out AddLinkerInputs() function.Daniel Dunbar2010-09-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114138 91177308-0d34-0410-b5e6-96231b3b80d8