aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
AgeCommit message (Collapse)Author
2010-12-08Driver: M and MM should be grouped together, <rdar://problem/8744831>.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-01Handle -nostartfiles.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29Merge System into Support.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-21Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119915 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-19Driver/Darwin: Don't pass -demangle to an iOS linker, which may not understandDaniel Dunbar
it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-19Driver: Ignore -force_cpusubtype_ALL.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119803 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-18-Rename -Wargument-larger-than -> -Wlarge-by-value-copyArgyrios Kyrtzidis
-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
2010-11-17Introduce option -Wargument-larger-than[=N] which warns about function ↵Argyrios Kyrtzidis
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
2010-11-17Implement -pie.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119577 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17Don't warn aboutRafael Espindola
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
2010-11-17Don't warn about -w not being used in a link. Necessary to get saneRafael Espindola
results in the gdb testsuite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119552 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-17Silence warning for "clang -O2 -O0 -c foo.c -o foo.o.Rafael Espindola
Fixes PR8607. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-15Fixes PR8611.Rafael Espindola
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
2010-11-13Driver: Support -Oz as an alias for -Os.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119003 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-12Add support for -nostdlib in the linux toolchain.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118878 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11Add support for -s, -pthread and -pthreads. Thanks to Hans Wennborg andRafael Espindola
Cosmin Truta for reporting it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118826 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11Driver: Allow build system override of default non-fragile ABI version.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118786 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-11Add -rdynamic to freebsd and openbsd. Patch by Ruben.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118771 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09Add support for soft/hard float options to the Sparc targetBruno Cardoso Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118514 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07Add support for -rdynamic.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118384 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07Use ld directly on linux. Changes from the previous try:Rafael Espindola
*) 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
2010-11-03Implement -working-directory.Argyrios Kyrtzidis
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
2010-11-03Revert while I debug test failures :-(Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118150 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03Switch clang to run ld directly on linux. I tested this on all the linuxRafael Espindola
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
2010-11-02Driver: Silently ignore -fasm-blocks for now instead of error'ing, this causeDaniel Dunbar
some unexpected fallout. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118037 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28Driver/IA: Ignore -L for now, which users shouldn't be using for semantic ↵Daniel Dunbar
effect. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
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-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-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-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-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-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: 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