Commit Graph

1575 Commits

Author SHA1 Message Date
Chad Rosier 7b1fee1fe5 Roll logic into a single if statement, per David's suggestion.
llvm-svn: 156502
2012-05-09 18:55:57 +00:00
Chad Rosier bf8628e62f Use the triple directly, rather then getTriple().
llvm-svn: 156501
2012-05-09 18:51:13 +00:00
Chad Rosier 266c620623 Now the proper fix for r156497. Sorry for the churn.
llvm-svn: 156498
2012-05-09 18:46:30 +00:00
Chad Rosier 6037c6bae0 Move the iOSVersionMin string to a header so as to avoid a dangling pointer.
llvm-svn: 156497
2012-05-09 18:37:26 +00:00
Chad Rosier f761fe9d23 [driver] Use the iOS target triple to infer the deployment target.
rdar://11409204

llvm-svn: 156489
2012-05-09 18:09:58 +00:00
Bob Wilson e78227b1ff Ignore a "generic" return value from getHostCPUName. <rdar://problem/11314502>
llvm-svn: 156487
2012-05-09 17:53:10 +00:00
Nuno Lopes 3d6311d5f7 add -fbounds-checking option.
When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend.

OK'ed by Chad; thanks for the review.

llvm-svn: 156431
2012-05-08 22:10:46 +00:00
Chad Rosier aaec1338b1 StringRefize code because we're good even when we crash.
Patch by Jordy Rose.

llvm-svn: 156172
2012-05-04 15:32:05 +00:00
Jean-Daniel Dupas 73d801cd8a Fix -Wlarge-by-value-copy option handling in the driver.
CC1 supports only the joined format.

llvm-svn: 156161
2012-05-04 08:08:37 +00:00
Alexey Samsonov 74a3868dbb This patch adds a new Clang compiler flag "-gline-tables-only".
It reduces the amount of emitted debug information:
1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram,
DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only.
2) .debug_str contains only function names.
3) No debug data for types/namespaces/variables is emitted.
4) The data in .debug_line is enough to produce valid stack traces with
function names and line numbers.

Reviewed by Eric Christopher.

llvm-svn: 156160
2012-05-04 07:39:27 +00:00
Bob Wilson e64bd84ec7 Remove obsolete code for finding a fallback iOS SDK. <rdar://problem/11378535>
llvm-svn: 156149
2012-05-04 03:09:46 +00:00
Chad Rosier dcef562557 [driver - crash diagnostics] Convert the flags back to an array of strings and use
array_lengthof.  Also, append the new filename with correct preprocessed suffix.
Last part of rdar://11285725

llvm-svn: 156117
2012-05-03 22:38:00 +00:00
Chad Rosier 45cf50f7b6 Use array_lengthof instead of sizeof trickery.
llvm-svn: 156104
2012-05-03 21:25:34 +00:00
Chad Rosier 1c5add6c5b [driver - crash diagnostics] Only write the failing command in the script.
Part of rdar://11285725

llvm-svn: 156096
2012-05-03 20:17:15 +00:00
Chad Rosier cb600e2422 Canonicalize loop.
llvm-svn: 156093
2012-05-03 19:50:25 +00:00
Chad Rosier f91fb400b3 [driver crash diagnostics] Remove more flags that reference absolute paths that
aren't necessary to reproduce the clang crash.
Part of rdar://11285725

llvm-svn: 156079
2012-05-03 17:07:55 +00:00
Bob Wilson f9fbc6a84a Rip out old code for finding libraries in GCC's directories.
llvm-svn: 156058
2012-05-03 05:23:52 +00:00
Benjamin Kramer c242ef245c Driver: Turn the default value for -fmath-errno into a proper target hook and disable it by default on more platforms.
For now -fno-math-errno is the default on BSD-derived platforms (Darwin,
DragonFlyBSD, FreeBSD, NetBSD, OpenBSD). If the default is not right for
your platform, please yell. I only verified the result with the default
compilers on Darwin and FreeBSD.

llvm-svn: 155990
2012-05-02 14:55:48 +00:00
James Molloy cebf75e8ca Fix forwarding of -fpack-struct from driver to CC1, and add a test.
-fpack-struct's handling has changed in CC1 (one of only two flags that needed changing) because the driver treats "-fpack-struct" as a boolean flag, and CC1 (did) treat it as an option with a separated value.

This change causes -fpack-struct=X to be forwarded correctly to -fpack-struct=X instead of erroneously to "-fpack-struct X"

llvm-svn: 155981
2012-05-02 07:56:14 +00:00
Andrew Trick 4d77ceaa22 Speculatively fix windows cmake builders.
Really just a wild stab in the dark.

llvm-svn: 155974
2012-05-02 01:23:51 +00:00
James Molloy a3c85b8629 Unify Options.td and CC1Options.td, in a first step towards unifying the serialization logic in Frontend and Driver.
Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/

llvm-svn: 155916
2012-05-01 14:57:16 +00:00
Douglas Gregor f7b8841b71 Add support for openSUSE 12.2, from Ismail Donmez!
llvm-svn: 155860
2012-04-30 23:42:57 +00:00
Chad Rosier 98ab91c226 [driver] Don't try to set the deployment target when there is no bound
architecture; this was happening for tools such as lipo and dsymutil.
Also, if no -arch option has been specified, set the architecture based
on the TC default.
rdar://11329656

llvm-svn: 155730
2012-04-27 19:51:11 +00:00
Chad Rosier a78a6eb408 Fix logic such that we only call getToolChain once. No functional change
intended.

llvm-svn: 155719
2012-04-27 16:50:38 +00:00
Chad Rosier 631fa107eb Remove redundant calls to BAA->getArchName(). No functional change
intended.

llvm-svn: 155718
2012-04-27 16:48:16 +00:00
Chad Rosier 7c5d908d81 Revert 155679; Not a typo.
llvm-svn: 155708
2012-04-27 14:58:16 +00:00
Chad Rosier a2a59ade6c Typo.
llvm-svn: 155679
2012-04-27 00:35:50 +00:00
Simon Atanasyan 9bb634df36 MIPS: Add support for 64-bit MIPS targets: mips64 / mips64el.
llvm-svn: 155656
2012-04-26 19:57:02 +00:00
Chandler Carruth 3634c66b41 Fix a long-standing bug where Clang had a different default from GCC on
Linux and other (non-Darwin) platforms and have it use -fmath-errno by
default (for better or worse).

Darwin has seen the light here and uses -fno-math-errno by default, this
patch preserves that.

If any maintainers for a non-Linux platform would also like to opt-in to
-fno-math-errno by default, I'm happy to add folks, but we're currently
getting buts and misleading comparisons with GCC due to this difference
in behavior on Linux at least.

llvm-svn: 155607
2012-04-26 02:10:51 +00:00
Evgeniy Stepanov 7786671b5a Clang driver support for linking on Android.
llvm-svn: 155541
2012-04-25 08:59:22 +00:00
Evgeniy Stepanov 78eaa2cd1b Fix default cpu for -march=armv5e.
llvm-svn: 155540
2012-04-25 08:35:56 +00:00
Evgeniy Stepanov 582911a089 Only pass -mcpu, -march, -mfpu to linux-as on ARM.
llvm-svn: 155431
2012-04-24 09:05:31 +00:00
Chandler Carruth 70ac923ebc Revert r155363, due to the underlying patches in LLVM causing regression
test suite failures.

llvm-svn: 155371
2012-04-23 18:25:40 +00:00
Sirish Pande 7039d0eaee Hexagon V5 (floating point) support in cfe.
llvm-svn: 155363
2012-04-23 17:48:57 +00:00
Bob Wilson 7dda0cdcd7 Link with Foundation whenever -fobjc-link-runtime is used. <rdar://10976177>
The check for excluding libarclite on i386 MacOSX should not apply to
Foundation.

llvm-svn: 155263
2012-04-21 00:21:42 +00:00
Chad Rosier 5b58af0381 In r135308, -save-temps was modified to prevent a temporary file from
overwriting the input file.  For example,

clang -c foo.s -o foo.o -save-temps

Unfortunately, the original patch didn't compare the paths of the input and
output files.  Thus, something like the following would fail to create foo.s.

cd /tmp/obj
clang -c ../src/foo.s -o foo.o -save-temps

rdar://11252615

llvm-svn: 155224
2012-04-20 20:05:08 +00:00
Chad Rosier 232150b90a When generating the clang crash diagnostic script, strip out the -o flag.
Add a FIXME comment.
rdar://11283560

llvm-svn: 155207
2012-04-20 17:21:42 +00:00
Chad Rosier 681e4b8d96 Add a little hack to emulate a clang crash, so the diagnostics generator can be
tested.

llvm-svn: 155205
2012-04-20 17:08:59 +00:00
Evgeniy Stepanov ed943f66d6 Pass -mfloat-abi= to linuxtools assembler.
llvm-svn: 155191
2012-04-20 09:03:40 +00:00
Chad Rosier 9c74e4310c When generating the clang crash diagnostic script, strip out the -D, -F, and -I
flags.  We have preprocessed source, so we don't need these.

No test case as it's fairly difficult to make the compiler crash on demand.  I'll
patiently wait for Ben to tell me how to do this in 2 lines of code.  :)
rdar://11283560

llvm-svn: 155180
2012-04-20 00:30:04 +00:00
Chandler Carruth b8ae76037a Revert some Hexagon builtin commits to match reverts done to LLVM in
r155047. See the LLVM log for the primary motivation:
  http://llvm.org/viewvc/llvm-project?rev=155047&view=rev

Primary commit r154828:
  - Several issues were raised in review, and fixed in subsequent
    commits.
  - Follow-up commits also reverted, and which should be folded into the
    original before reposting:
    - r154837: Re-add the 'undef BUILTIN' thing to fix the build.
    - r154928: Fix build warnings, re-add (and correct) header and
      license
    - r154937: Typo fix.

Please resubmit this patch with the relevant LLVM resubmission.

llvm-svn: 155048
2012-04-18 21:32:25 +00:00
Gabor Greif 5d3231cecb fix GCC version comparison wrt. equal patch suffices (and squash two typos)
llvm-svn: 154997
2012-04-18 10:59:08 +00:00
Gabor Greif 8a45d57a1d fix a typo
llvm-svn: 154920
2012-04-17 11:16:26 +00:00
Sirish Pande f02eebef2a Hexagon V5(Floating Point) support.
llvm-svn: 154828
2012-04-16 17:04:05 +00:00
Sebastian Pop 980920a321 use DEFAULT_SYSROOT
llvm-svn: 154792
2012-04-16 04:16:43 +00:00
David Blaikie 6f9f4ebc9f Correct indentation
llvm-svn: 154774
2012-04-15 21:22:10 +00:00
David Chisnall 3d127c79e8 Don't link lib[std]c++ when -nostdlib is specified (Solaris driver).
Patch by Dmitri Shubin!

llvm-svn: 154392
2012-04-10 11:49:50 +00:00
Evgeniy Stepanov 70cb3d623b Pass -march, -mcpu, -mfpu to linuxtools assembler.
llvm-svn: 154389
2012-04-10 09:05:40 +00:00
Rafael Espindola 9446d76e80 Fix an annoying little bug I found while debugging another LTO issue. Gold
requires the -plugin to come before any -plugin-opt options, we were passing
them the other way around. With this one can run (for example):

clang -o foo foo.c -O4 -Wl,-plugin-opt=generate-api-file

llvm-svn: 154357
2012-04-09 23:53:34 +00:00
Fariborz Jahanian 0568407543 objective-c: remove -fobjc-default-synthesize-properties from the driver.
cc1 option remains though to invoke default property synthesis.
// rdar://11209719

llvm-svn: 154334
2012-04-09 18:58:55 +00:00