aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
AgeCommit message (Collapse)Author
2012-11-02Improve x86 android support:Rafael Espindola
* -Bsymbolic must be added for x86 as well. * Default CPU name also set to 'core2' for x86 android. Patch by Edwin Vane. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167307 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-02Add -lpthread when building with Ubsan on Linux, in preparation for making ↵Richard Smith
libclang-rt.ubsan pull in sanitizer_common, which in turn depends on pthreads. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167305 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01Remove first argument from Arg::getValue; it's been unused since r105760.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167211 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-31getArchTypeForDarwinArchName is only used in the clang driver, copy it there.Rafael Espindola
I will remove it from llvm in the next commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167156 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30[driver] Older versions of ld expect '-L<dir>' not '-L <dir>'. In Xcode4 andChad Rosier
later, '-L <dir>' is allowed, but rewrite these in the driver as '-L<dir>' to maintain backward compatibility. The same is true for the -I option. rdar://12366753 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167054 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-27Reverted back the changes made in 166868 and in 166869Mahesha S
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166871 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-27-------------------------------------------------Mahesha S
Feature: OpenMP support in CLANG: Sub-Feature: Support for option -fopenmp Files Changed/Added: * include/clang/Driver/Options.td (C) * include/clang/Basic/LangOptions.def (C) * lib/Driver/Tools.cpp (C) * lib/Frontend/CompilerInvocation.cpp (C) Test Cases Changed/Added: * test/Driver/clang_fopenmp_opt.c (A) ------------------------------------------------- git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166868 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25-fcatch-undefined-behavior checking for appropriate vptr value: Clang ↵Richard Smith
CodeGen side. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166661 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-23Handle -pthread, -pg and -shared correctly on bitrig.Rafael Espindola
Patch by David Hill. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166483 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-22[Options] Add prefixes to options.Michael J. Spencer
Each option has a set of prefixes. When matching an argument such as -funroll-loops. First the leading - is removed as it is a prefix. Then a lower_bound search for "funroll-loops" is done against the option table by option name. From there each option prefix + option name combination is tested against the argument. This allows us to support Microsoft style options where both / and - are valid prefixes. It also simplifies the cases we already have where options come in both - and -- forms. Almost every option for gnu-ld happens to have this form. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166444 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-22driver/Darwin: Default to AAPCS for M-class CPUs.Daniel Dunbar
- This is an assumption that is currently hardwired into the backend, we need to do this in order for the frontend and backend to agree. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166428 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-21Add support of MIPS n32 ABI to the Clang driver. The fix builds correct ↵Simon Atanasyan
library/object files paths and passes appropriate command line options to the linker if user provides -mabi=n32 option. The patch reviewed by Rafael Espindola. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166389 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19[Options] Make Option non clang specific.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166348 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.Argyrios Kyrtzidis
This seems to have introduced assertion hit when building compiler-rt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166245 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18Add a new option for and disable column number information as thereEric Christopher
are no known current users of column info. Robustify and fix up a few tests in the process. Reduces the size of debug information by a small amount. Part of PR14106 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166236 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18[Options] Make Option non clang specific.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166230 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-16GNUstep runtime version default to 1.6, generate correct property attributeDavid Chisnall
metadata. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166023 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-15Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165988 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-15Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.Nico Weber
See PR14013. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165962 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09[driver] Remove redundant cases due to overlapping commits between Ted ↵Chad Rosier
(r165531, 165532) and I (r165534), but leave the test case in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165537 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09-fcatch-undefined-behavior: emit calls to the runtime library whenever one ↵Richard Smith
of the checks fails. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09[driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]Chad Rosier
options when clang invokes cc1plus for i386 kexts. rdar://12459188 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165534 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09Don't forward -Wenum-conversion to cc1plus.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165532 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09Don't forward -Wint-conversion to cc1plus.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165531 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-07Use getArch instead of getArchName + string compare.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165370 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-04Driver: Link crtfastmath.o if it's available and -ffast-math is specified.Benjamin Kramer
crtfastmath.o contains routines to set the floating point flags to a faster, unsafe mode. Linking it in speeds up code dealing with denormals significantly (PR14024). For now this is only enabled on linux where I can test it and crtfastmath.o is widely available. We may want to provide a similar file with compiler-rt eventually and/or enable it on other platforms too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165240 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02During LTO, we call 'dsymutil' when we compile source files. This necessitatesBill Wendling
clang specifying a temporary file that it later cleans up so that it can survive the linking stage. However, when we compile object files during LTO we don't call 'dsymutil'. That's done at a different stage (if at all). We rely upon the linker to specify a unique name for the temporary file it generates. <rdar://problem/12401423> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165028 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-29Add Clang support for iOS6.Bob Wilson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164907 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-29Add armv7s and some other arm variants supported by Mach-O files.Bob Wilson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164905 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-28Modern objcective-C translator. When doing rewriting, Do not Fariborz Jahanian
use the integrated pre-processor, preprocess in objective-c++ mode. // rdar://12189793. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164836 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26Allow -MF to be used in combination with -E -M or -E -MM.Benjamin Kramer
Fixes PR13851. Patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164717 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-25[driver] Add support for the -fno-fast-math option.Chad Rosier
rdar://12299433 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164638 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-24[analyzer] Really turn on dynamic-bifurcation on by default.Anna Zaks
Thanks to Byoungyoung for realizing taht we are not passing the default option correctly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164543 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-21Add four new command line options for MIPS CPU selection:Simon Atanasyan
-mips32, -mips32r2, -mips64, -mips64r2. The patch reviewed by Eric Christopher. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164410 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-18Add e500mc and e5500 to the list of valid PPC CPU names.Hal Finkel
Patch by Tobias von Koch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164176 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13This patch introduces A15 as a target in Clang.Silviu Baranga
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163804 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13Conditionally parse documentation comments in system headers byTed Kremenek
passing -fretain-comments-from-system-headers. By default, the compiler no longer parses such documentation comments, as they can result in a noticeable compile time/PCH slowdown. Fixes <rdar://problem/11860820>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163778 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-13Properly link libpthread_p when using profiling on OpenBSD.Eric Christopher
Patch by Brad Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163777 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12Claim --param ssp-buffer-size, even if the stack protector is notJoerg Sonnenberger
active. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163705 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-12Make -faddress-sanitizer on Android link to the new-style runtime.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163689 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10Wrong crtbegin/crtend pair used for PIE on Android.Evgeniy Stepanov
Android uses the same flavour of crt*.o for PIE and non-PIE executables, and a different one for DSOs. GNU/Linux, on the other hand, uses one set of crt*.o for non-PIE executables, and another for both PIE executables and DSOs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163500 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-10MIPS: Use -march=arch option to select either generic MIPS ISA,Simon Atanasyan
or the name of a particular processor. The patch reviewed by Douglas Gregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-07Link to crtend.S when PIE in the FreeBSD driver. Patch by Brooks Davis!Roman Divacky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163388 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05Apply some driver improvements for freebsd-*-mips*.Eric Christopher
Patch by Brooks Davis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163249 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-02Rename ANDROIDEABI to Android.Logan Chien
Most of the code guarded with ANDROIDEABI are not ARM-specific, and having no relation with arm-eabi. Thus, it will be more natural to call this environment "Android" instead of "ANDROIDEABI". Note: We are not using ANDROID because several projects are using "-DANDROID" as the conditional compilation flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163088 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30Reland r160052: Default to -std=c++11 on Windows.Nico Weber
Also update the tests that rely on c++98 to explicitly mention that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162890 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30Emit .gcda files as absolute paths instead of relative paths.Bill Wendling
This improves compatibility with gcc in this regard, and this file generation can be ameliorated with GCOV_PREFIX and GCOV_PREFIX_STRIP. It's also useful if your build directory doesn't specify -o <abspath> and it uses a recursive make structure, so it's not relative to the toplevel. Patch by Joshua Cranmer! <rdar://problem/12179524> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162884 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-28Cleanup FreeBSD linking and add support for -pie.Roman Divacky
Path by Brooks Davis, tests and fixes from me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162761 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-27MIPS: Use -G option to specify MIPS section threshold. Translate itSimon Atanasyan
to the -mllvm -mips-ssection-threshold=<value> pair and pass to the frontend. The patch suggested by Carl Norum. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162697 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-21[driver] Add support for the --param ssp-buffer-size= driver option.Chad Rosier
PR9673 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162285 91177308-0d34-0410-b5e6-96231b3b80d8