summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Support ARM hard float (arm-linux-gnueabihf).Jiangning Liu2012-07-311-8/+4
| | | | llvm-svn: 161038
* No longer emitting a PCH file when using -fsyntax-only on a header file. ↵Aaron Ballman2012-07-311-1/+3
| | | | | | Fixes PR13343. llvm-svn: 161019
* Fix dynamic object linker for ARM GNUEABIHF.Jiangning Liu2012-07-301-2/+6
| | | | llvm-svn: 160958
* Provide correct linker command line options on FreeBSD 8 (GNU ld 2.15) and ↵David Chisnall2012-07-291-3/+17
| | | | | | | | on newer FreeBSD (GNU ld 2.17). Patch by Dimitry Andric! llvm-svn: 160931
* Rename -fms-inline-asm to -fenable-experimental-ms-inline-asm.Chad Rosier2012-07-201-2/+2
| | | | llvm-svn: 160590
* Add a new flag, -fms-inline-asm, that enables the output of MS-style inlineChad Rosier2012-07-201-0/+4
| | | | | | | | | | | assembly. By default, we don't emit IR for MS-style inline assembly (see r158833 as to why). This is strictly for testing purposes and should not be enabled with the expectation that things will work. This is a temporary flag and will be removed once MS-style inline assembly is fully supported. llvm-svn: 160573
* Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.Bob Wilson2012-07-191-4/+7
| | | | | | | This macro was being unconditionally set to zero, preceded by a FIXME comment. This fixes <rdar://problem/11845441>. Patch by Michael Gottesman! llvm-svn: 160491
* Enable new linker behaviour on FreeBSD.David Chisnall2012-07-151-0/+2
| | | | llvm-svn: 160231
* Revert r160052, "Default to -std=c++11 on Windows.", for now.NAKAMURA Takumi2012-07-121-5/+2
| | | | | | | | | Failing Tests (3): Clang :: Index/complete-cxx-inline-methods.cpp Clang :: Index/recursive-cxx-member-calls.cpp Clang :: SemaTemplate/inject-templated-friend-post.cpp llvm-svn: 160103
* Default to -std=c++11 on Windows.Nico Weber2012-07-111-2/+5
| | | | llvm-svn: 160052
* Re-apply r159875 with fixes.Ted Kremenek2012-07-071-1/+2
| | | | | | | - Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32 - Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic. llvm-svn: 159892
* Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement ↵NAKAMURA Takumi2012-07-071-2/+1
| | | | | | | | | | -Weverything." It broke several builds. I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test. > 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp llvm-svn: 159886
* Implement -Wpedantic and --no-pedantic to complement -Weverything.Ted Kremenek2012-07-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces some magic in tablegen to create a "Pedantic" diagnostic group which automagically includes all warnings that are extensions. This allows a user to suppress specific warnings traditionally under -pedantic used an ordinary warning flag. This also allows users to use #pragma to silence specific -pedantic warnings, or promote them to errors, within blocks of text (just like any other warning). -Wpedantic is NOT an alias for -pedantic. Instead, it provides another way to (a) activate -pedantic warnings and (b) disable them. Where they differ is that -pedantic changes the behavior of the preprocessor slightly, whereas -Wpedantic does not (it just turns on the warnings). The magic in the tablegen diagnostic emitter has to do with computing the minimal set of diagnostic groups and diagnostics that should go into -Wpedantic, as those diagnostics that already members of groups that themselves are (transitively) members of -Wpedantic do not need to be included in the Pedantic group directly. I went back and forth on whether or not to magically generate this group, and the invariant was that we always wanted extension warnings to be included in -Wpedantic "some how", but the bookkeeping would be very onerous to manage by hand. -no-pedantic (and --no-pedantic) is included for completeness, and matches many of the same kind of flags the compiler already supports. It does what it says: cancels out -pedantic. One discrepancy is that if one specifies --no-pedantic and -Weverything or -Wpedantic the pedantic warnings are still enabled (essentially the -W flags win). We can debate the correct behavior here. Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp that determine whether to include the "-pedantic" flag in the warning output. This is no longer needed, as all extensions now have a -W flag. This patch also significantly reduces the number of warnings not under flags from 229 to 158 (all extension warnings). That's a 31% reduction. llvm-svn: 159875
* Add -ffp-contract = { fast | on | off } command line option support.Lang Hames2012-07-061-0/+18
| | | | | | | | | | | | | | | | | This flag sets the 'fp-contract' mode, which controls the formation of fused floating point operations. Available modes are: - Fast: Form fused operations anywhere. - On: Form fused operations where allowed by FP_CONTRACT. This is the default mode. - Off: Don't form fused operations (in future this may be relaxed to forming fused operations where it can be proved that the result won't be affected). Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off' modes are equivalent. llvm-svn: 159794
* MIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.Simon Atanasyan2012-07-051-0/+6
| | | | llvm-svn: 159769
* MIPS: Factor out the code converting command line options to target features.Simon Atanasyan2012-07-051-8/+17
| | | | llvm-svn: 159767
* MIPS: Add -mips16 / -mno-mips16 command line support.Simon Atanasyan2012-07-051-0/+9
| | | | llvm-svn: 159747
* Hoist the logic for selecting the Objective-C dispatch method into the runtimeDavid Chisnall2012-07-041-1/+2
| | | | | | class, from the target. No functionality change, just less duplicated logic. llvm-svn: 159710
* A few more cleanups for the GNU family of ObjC runtimes.David Chisnall2012-07-041-1/+6
| | | | llvm-svn: 159708
* Move a comment from the commit message into the code.Bob Wilson2012-07-041-0/+5
| | | | llvm-svn: 159696
* Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall2012-07-031-1/+1
| | | | | | runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
* When using -pg targeting OS X 10.8, pass -no_new_main to the linker.Bob Wilson2012-07-031-0/+3
| | | | | | | | | | By default on OS X 10.8, we don't link with a crt1.o file and the linker knows to use _main as the entry point. But, when compiling with -pg, we need to link with the gcrt1.o file, and the linker needs to be told to use the "start" symbol as the entry point. The -no_new_main linker option does that last part. <rdar://problem/11491405> llvm-svn: 159683
* Add -ftls-model command-line flag.Hans Wennborg2012-06-281-0/+2
| | | | | | This allows for setting the default TLS model. (PR9788) llvm-svn: 159336
* Enable -mcpu=native and -march=native for arm targets.Benjamin Kramer2012-06-261-34/+53
| | | | | | This is only implemented on linux at the moment. llvm-svn: 159232
* Add template type diffing to Clang. This feature will provide a betterRichard Trieu2012-06-261-0/+2
| | | | | | | | | | | | comparison between two templated types when they both appear in a diagnostic. Type elision will remove indentical template arguments, which can be disabled with -fno-elide-type. Cyan highlighting is applied to the differing types. For more formatting, -fdiagnostic-show-template-tree will output the template type as an indented text tree, with differences appearing inline. Template tree works with or without type elision. llvm-svn: 159216
* Improve support for -g options accepted by Clang:Alexey Samsonov2012-06-211-7/+5
| | | | | | | | 1. Accept flags -g[0-3], -ggdb[0-3], -gdwarf-[2-4] and collapse them to simple -g (except -g0/-ggdb0). 2. Produce driver error on unsupported formats (-gcoff, -gstabs, -gvms) and options (-gtoggle). 3. Recognize and ignore flags -g[no-]strict-dwarf, -g[no-]record-gcc-switches. llvm-svn: 158906
* Revert "Provide a -no-pedantic to cancel out -pedantic." This needs to be ↵Ted Kremenek2012-06-201-2/+1
| | | | | | | | designed a bit further. We may wish to just have -Wno flags to silence warnings, and not have a -no-pedantic. llvm-svn: 158796
* Restructure how the driver communicates information about theJohn McCall2012-06-201-89/+138
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Add a -fuse-init-array option to cc1 and map to the UseInitArray targetRafael Espindola2012-06-191-0/+2
| | | | | | | | | option. On the driver, check if we are using libraries from gcc 4.7 or newer and if so pass -fuse-init-array to the frontend. The crtbegin*.o files in gcc 4.7 no longer call the constructors listed in .ctors, so we have to use .init_array. llvm-svn: 158694
* [VS Toolchain] Correctly forward -l linker inputs to link.exe.Michael J. Spencer2012-06-181-1/+8
| | | | | | Patch by Nikola Smiljanic! llvm-svn: 158664
* Support -f[no-]rewrite-includes from the driver.David Blaikie2012-06-141-0/+4
| | | | | | Review by Chandler Carruth. llvm-svn: 158463
* Provide a -no-pedantic to cancel out -pedantic.John McCall2012-06-131-1/+2
| | | | llvm-svn: 158416
* Add PPC support for translating gcc-style -mcpu options into LLVM ↵Hal Finkel2012-06-111-0/+71
| | | | | | | | | | | | | | -target-cpu options. This functionality is based on what is done on ARM, and enables selecting PPC CPUs in a way compatible with gcc's driver. Also, mirroring gcc (and what is done on x86), -mcpu=native support was added. This uses the host cpu detection from LLVM (which will also soon be updated by refactoring code currently in backend). In order for this to work, the target needs a list of valid CPUs -- we now accept all CPUs accepted by LLVM. A few preprocessor defines for common CPU types have been added. llvm-svn: 158334
* Require -pie when linking with ASan on Android.Evgeniy Stepanov2012-06-041-0/+2
| | | | llvm-svn: 157923
* MIPS: Factor out code selects the float ABI as determined by -msoft-float,Simon Atanasyan2012-06-021-15/+22
| | | | | | | -mhard-float, and -mfloat-abi= to the new function getMipsFloatABI. That simplifies reuse of this code. llvm-svn: 157888
* MIPS: Pass -KPIC argument to MIPS assembler if necessary.Simon Atanasyan2012-05-291-0/+12
| | | | llvm-svn: 157635
* Factor out the code retrieves the last PIC related argument fromSimon Atanasyan2012-05-291-16/+5
| | | | | | | the Clang::ConstructJob() to the new ArgList::getLastArg() routine with eight argument. That simplifies reusing of this code. llvm-svn: 157633
* Make Clang driver pass the last option from -g group to the compiler.Alexey Samsonov2012-05-291-6/+13
| | | | | | Leave a better fixme for different debug info flags llvm-svn: 157602
* [driver] Remove obsolete support for -A link option. The standard -A option isChad Rosier2012-05-161-5/+2
| | | | | | | | | | | | used by the preprocessor. Apple's GCC also supported a -A option for linking. The ld man page has the following: -A basefile - Obsolete incremental load format. This option is obsolete. Nick Kledzik confirms this option is no longer needed/supported. rdar://11455614 llvm-svn: 156965
* Rename the driver option to -mno-implicit-float, per Eli's suggestion.Chad Rosier2012-05-161-1/+1
| | | | llvm-svn: 156950
* [driver] Allow the driver to directly accept the -no-implicit-float option, ↵Chad Rosier2012-05-161-0/+3
| | | | | | | | | so that the generation of implicit floating point instructions can be disable for ARM. rdar://11409142 llvm-svn: 156942
* [tsan] add ThreadSanitizer linker flags on Linux and also copy the tsan-rt ↵Kostya Serebryany2012-05-161-0/+22
| | | | | | into the appropriate place at build time llvm-svn: 156906
* Add the Objective-C runtime linking arguments after user-specifiedDouglas Gregor2012-05-151-2/+2
| | | | | | linker arguments. Fixes <rdar://problem/11417441>. llvm-svn: 156853
* Do not link with Objective-C libraries with -nostdlib or -nodefaultlibs.Bob Wilson2012-05-151-1/+3
| | | | | | <rdar://problem/11433499> llvm-svn: 156841
* Teach the driver on Linux to respect -nodefaultlibs.Chandler Carruth2012-05-141-13/+16
| | | | | | Patch from Andrew C. Morrow. llvm-svn: 156771
* Hexagon V5 FP support.Sirish Pande2012-05-101-1/+7
| | | | llvm-svn: 156567
* Ignore a "generic" return value from getHostCPUName. <rdar://problem/11314502>Bob Wilson2012-05-091-1/+1
| | | | llvm-svn: 156487
* add -fbounds-checking option.Nuno Lopes2012-05-081-0/+9
| | | | | | | | 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
* Fix -Wlarge-by-value-copy option handling in the driver.Jean-Daniel Dupas2012-05-041-5/+5
| | | | | | CC1 supports only the joined format. llvm-svn: 156161
* This patch adds a new Clang compiler flag "-gline-tables-only".Alexey Samsonov2012-05-041-0/+2
| | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud