summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
* Introduce the notion of "Relocatable" precompiled headers, which are builtDouglas Gregor2009-07-071-0/+3
| | | | | | | | | | | | with a particular system root directory and can be used with a different system root directory when the headers it depends on have been installed. Relocatable precompiled headers rewrite the file names of the headers used when generating the PCH file into the corresponding file names of the headers available when using the PCH file. Addresses <rdar://problem/7001604>. llvm-svn: 74885
* Driver: Mark some Compilation members const.Daniel Dunbar2009-07-011-2/+2
| | | | llvm-svn: 74636
* Driver: Move Compilation::Execute to Driver::ExecuteCompilation.Daniel Dunbar2009-07-012-48/+48
| | | | | | | | | - The Compilation is just a helper class, it shouldn't have that amount of logic in it. - No functionality change. llvm-svn: 74634
* Driver: Improve diagnostics for failed commands.Daniel Dunbar2009-07-011-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Not all tools give good error messages, and sometimes the tool can fail w/o any error (for example, when signalled). - We suppress this message when the failing command is the compiler and it failed normally (exit code == 1), under the assumption that it gave a good diagnostic. For example, for a linker failure we now get: -- ddunbar@lordcrumb:tmp$ clang a.c b.c ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o clang: error: linker command failed with exit code 1 (use -v to see invocation) -- For a compiler crash we get: -- ddunbar@lordcrumb:tmp$ clang t.i Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573. 0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38 ... stack trace and virtual stack trace follow ... clang: error: compiler command failed due to signal 6 (use -v to see invocation) -- But for a regular compilation failure we get the usual: -- ddunbar@lordcrumb:tmp$ clang c.c c.c:1:6: error: invalid token after top level declarator int x ^ 1 diagnostic generated. -- - No test case, not amenable to non-executable testing. :/ - <rdar://problem/6945613> llvm-svn: 74629
* Driver: Add Source argument for Commands to hold the Action which caused aDaniel Dunbar2009-07-012-16/+18
| | | | | | | Command to be generated, to support more advanced diagnostics. - No functionality change. llvm-svn: 74627
* OpenBSD support.Daniel Dunbar2009-06-296-0/+242
| | | | | | - Patch by Jonathan Gray! llvm-svn: 74453
* Add stack protector support to clang. This generates the 'ssp' and 'sspreq'Bill Wendling2009-06-282-0/+41
| | | | | | | | function attributes. There are predefined macros that are defined when stack protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with -fstack-protector-all. llvm-svn: 74405
* Fix some TableGen-related dependencies for the Clang CMake buildDouglas Gregor2009-06-231-1/+1
| | | | llvm-svn: 73976
* Add some missing CMake dependenciesDouglas Gregor2009-06-181-0/+2
| | | | llvm-svn: 73700
* Stub out printing of the thread model with -v.Daniel Dunbar2009-06-161-1/+6
| | | | | | - Turns out libstdcxx greps for this in configure. llvm-svn: 73582
* Fake support for -print-multi-*Daniel Dunbar2009-06-161-0/+41
| | | | | | | - I think we will eventually need to support this for realz, and some build processes seem to depend on these options. llvm-svn: 73581
* Fix typo in prev commit.Daniel Dunbar2009-06-161-1/+1
| | | | llvm-svn: 73556
* Darwin/Driver: Also look at -arch command line options when finding the defaultDaniel Dunbar2009-06-161-8/+26
| | | | | | tool chain. llvm-svn: 73555
* Forward -C and -CC to clang.Daniel Dunbar2009-06-081-1/+10
| | | | | | - <rdar://problem/6945384> Driver should pass down -C and -CC llvm-svn: 73087
* PR4016: Forward -fno-show-source-location to clang.Daniel Dunbar2009-06-081-1/+4
| | | | llvm-svn: 73082
* Set function Attribute::NoImplicitFloat appropriately.Devang Patel2009-06-051-1/+1
| | | | llvm-svn: 72961
* Add driver support for -fsigned-char/-funsigned-char.Eli Friedman2009-06-051-0/+10
| | | | llvm-svn: 72930
* forward -fno-color-diagnostics to clang-cc.Torok Edwin2009-06-041-0/+3
| | | | llvm-svn: 72856
* PR4308: Fix support for -m32/-m64 on Linux.Eli Friedman2009-06-031-7/+22
| | | | | | I'll look into cleaning this up a bit as a followup. llvm-svn: 72794
* Driver: Support -mllvm; this just forwards options to clang-cc.Daniel Dunbar2009-06-031-0/+1
| | | | llvm-svn: 72780
* Fix rare failure of .ver-svn creation, it has a dependency that the outputDaniel Dunbar2009-06-011-1/+1
| | | | | | directory exist. llvm-svn: 72704
* ARM is a legitimate Darwin architecture; don't assert.Eli Friedman2009-05-281-1/+2
| | | | llvm-svn: 72538
* Fix for PR4140: Add the start of a Linux toolchain (basically, just Eli Friedman2009-05-264-0/+82
| | | | | | barely enough to get the given usage of -print-file-name working). llvm-svn: 72412
* Fix use after free, found by Benjamin Kramer.Daniel Dunbar2009-05-231-3/+3
| | | | llvm-svn: 72333
* This patch adds support for sender-aware dispatch in Objective-C for the GNU ↵Fariborz Jahanian2009-05-221-0/+1
| | | | | | | | | | runtime, when compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object planes, and a few other things. Patch by David Chisnall. llvm-svn: 72275
* Don't warn about -funit-at-a-time, and reject -fno-unit-at-a-time.Daniel Dunbar2009-05-221-1/+9
| | | | | | | | | | - We could just warn about -fno-unit-at-a-time, but in practice people using it probably aren't going to get what they want out of clang. Also, use "clang" specified error for unsupported things instead of driver unsupported error. llvm-svn: 72272
* (llvm up) Use llvm::Triple for storing target triples.Daniel Dunbar2009-05-225-138/+108
| | | | | | | - This commit has some messy stuff in it to extend string lifetimes, but that will go away once we switch to using the enum'd Triple interfaces. llvm-svn: 72243
* Don't rely on getArchName() to return a constant string reference.Daniel Dunbar2009-05-221-11/+14
| | | | llvm-svn: 72241
* Add --analyzer-no-default-checks and --analyzer-output options.Daniel Dunbar2009-05-221-13/+19
| | | | llvm-svn: 72238
* Remove -fprintf-source-range-info from the Driver (this was renamed)Daniel Dunbar2009-05-181-1/+0
| | | | llvm-svn: 72061
* Reformat a commentDaniel Dunbar2009-05-181-5/+4
| | | | llvm-svn: 72046
* Driver: Emit an unsupported error on -iframework.Daniel Dunbar2009-05-131-1/+2
| | | | llvm-svn: 71698
* Tweak x86 -mcpu defaults.Daniel Dunbar2009-05-061-0/+5
| | | | | | | | | - Default to yonah on Darwin (to get SSE3). - Default to Pentium4 (32-bit) and x86-64 (64-bit) on non-Darwin. Welcome to the 21st century. llvm-svn: 71069
* Improve handling of (X86) target features.Daniel Dunbar2009-05-061-51/+47
| | | | | | | | | | | | | | | | | | | | | - This is a WIP... - This adds -march= handling to the driver, and fixes the defaulting of -mcpu on Darwin (which was using the wrong test). Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as -target-feature [+-]name In clang-cc, communicate with the (clang) target to discover the legal features of a target, and the features which are enabled based on -mcpu. This is currently hardcoded just enough to not be a feature regression, we need to get this information from the backend's TableGen information somehow. This is used to construct the full list of features which are being used, which is in turn used to initialize the predefines. llvm-svn: 71061
* Add --analyze-auto.Daniel Dunbar2009-05-061-2/+3
| | | | | | | | - Currently just an alias for --analyze, eventually we want to refit --analyze so that it is less automatic (i.e., does not force plist output and does not hard code the list of checks). llvm-svn: 71056
* Add -fobjc-tight-layout.Daniel Dunbar2009-05-041-0/+1
| | | | | | | | | | | | | | | | | | | - This implements gcc style Objective-C interface layout (I think). Currently it is always off, there is no functionality change unless this is passed. For the curious, the deal is that gcc lays out the fields of a subclass as if they were part of the superclass. That is, the subclass fields immediately follow the super class fields instead of being padded to the alignment of the superclass structure. - Currently gcc uses the tight layout in 32-bit and 64-bit modes, and llvm-gcc uses it in 32-bit only, for reasons which aren't clear yet. We probably want to switch to matching gcc, once this makes it through testing... my hope is that we can also fix llvm-gcc in order to maintain compatibility between the compilers. llvm-svn: 70827
* Driver: When using the generic gcc tool, pass -m32 or -m64 if weDaniel Dunbar2009-05-021-1/+10
| | | | | | | | | recognize the architecture. - This is an attempt to force gcc to the write target. - PR4094. llvm-svn: 70647
* Driver: Generate an error when trying to pass an LLVM bc input to aDaniel Dunbar2009-05-021-2/+22
| | | | | | non-Darwin linker (sorry Gold + LTO-plugin users). llvm-svn: 70641
* DragonFly ToolChain definition for driver.Daniel Dunbar2009-05-026-3/+306
| | | | | | - Patch by Alex Hornung! llvm-svn: 70635
* Implement -fmessage-length=N, which word-wraps diagnostics to N columns. Douglas Gregor2009-05-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Also, put a line of whitespace between the diagnostic and the source code/caret line when the start of the actual source code text lines up (or nearly lines up) with the most recent line of the diagnostic. For example, here it's okay for the last line of the diagnostic to be (vertically) next to the source line, because there is horizontal whitespace to separate them: decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin type can only take one argument typeof(int)(a,5)<<a; However, here is a case where we need the vertical separation (since there is no horizontal separation): message-length.c:10:46: warning: incompatible pointer types initializing 'void (int, float, char, float)', expected 'int (*)(int, float, short, float)' int (*fp1)(int, float, short, float) = f; This is part one of <rdar://problem/6711348>. llvm-svn: 70578
* Revert r70424. We don't need itDouglas Gregor2009-04-291-3/+0
| | | | llvm-svn: 70432
* Add PCH version to the -v outputDouglas Gregor2009-04-291-0/+3
| | | | llvm-svn: 70424
* Make sure to pass the same options to the static analyzer as theDaniel Dunbar2009-04-291-140/+140
| | | | | | | compiler. - Code generation options may still affect the language... llvm-svn: 70393
* Enable PCH by defaultDouglas Gregor2009-04-281-1/+1
| | | | llvm-svn: 70339
* With -ccc-pch-is-pch, always treat precompiled inputs as PCH,Daniel Dunbar2009-04-281-1/+1
| | | | | | | | regardless of extension. - Otherwise we can't expect that just plugging in -ccc-pch-is-pch will work. llvm-svn: 70318
* Add a header containing the Clang version; make the driver use thisDouglas Gregor2009-04-271-4/+5
| | | | | | | | | Clang version value rather than hard-coding "1.0". Add PCH and Clang version information into the PCH file. Reject PCH files with the wrong version information. llvm-svn: 70264
* Turn PCH off by default, yet again. I'm happier about it this time, thoughDouglas Gregor2009-04-261-1/+1
| | | | llvm-svn: 70168
* Trying turning on PCH by default yet again. We might actually a chance at ↵Douglas Gregor2009-04-261-1/+1
| | | | | | success now llvm-svn: 70164
* Turn off PCH by default, againDouglas Gregor2009-04-261-1/+1
| | | | llvm-svn: 70113
* One more crazy try with PCH-by-defaultDouglas Gregor2009-04-261-1/+1
| | | | llvm-svn: 70112
OpenPOWER on IntegriCloud