summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
Commit message (Collapse)AuthorAgeFilesLines
...
* [driver crash diagnostics] Strip -internal-isystem and ↵Chad Rosier2012-07-251-0/+2
| | | | | | | | -internal-externc-isystem. rdar://11949066 llvm-svn: 160752
* [driver crash diagnostics] Strip -idirafter, -iprefix, -iwithprefix,Chad Rosier2012-07-251-0/+5
| | | | | | | -iwithprefixbefore, and -isystem options, per Matt's suggestion. rdar://11949066 llvm-svn: 160750
* [driver crash diagnostics] A few enhancements:Chad Rosier2012-07-251-1/+19
| | | | | | | | | -Strip -iquote and -M options. -Quote -D options to avoid problems with command line macros that include parens. rdar://11949066 llvm-svn: 160743
* 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
* Force the OS X version to 10.6 for old-style simulator builds.Bob Wilson2012-07-191-0/+5
| | | | | | | | | | | | | The hack of recognizing a -D__IPHONE_OS_VERSION_MIN_REQUIRED option in place of -mios-simulator-version-min leaves the Darwin version unspecified. It can be set separately with -mmacosx-version-min (which makes no sense) or inferred to match the host version (which is unpredictable and usually wrong). This really needs to get cleaned up, but in the meantime, force the OS X version to 10.6 so that the behavior is sane for the iOS simulator. Thanks for Argyrios for the patch. <rdar://problem/11858187> llvm-svn: 160484
* [Win32] Rework crash-report since r145389.NAKAMURA Takumi2012-07-171-7/+1
| | | | | | | | | | | - lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions. - test/Driver/crash-report.c: Add REQUIRES:shell for now. FIXME: setenv should work also on Lit.InternalShellRunner. - test/Driver/crash-report.c: Remove XFAIL. Thanks to Chad, To point out the issue. llvm-svn: 160343
* 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
* [driver] Fix so that clang can find correct path prefix for libc object filesChad Rosier2012-07-111-0/+5
| | | | | | | from GNU binutils supporting multi-arch folder for ARM target. Patch by Jiangning Liu <jiangning.liu@arm.com>. llvm-svn: 160060
* Default to -std=c++11 on Windows.Nico Weber2012-07-111-2/+5
| | | | llvm-svn: 160052
* 80-column and whitespace.Chad Rosier2012-07-091-8/+9
| | | | llvm-svn: 159942
* 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-042-30/+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-032-2/+2
| | | | | | 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
* Include -D files in crash report repro scripts. (PR13255)David Blaikie2012-07-021-1/+0
| | | | | | | | | | | | Now that we're only using -frewrite-includes rather than full preprocessing when producing repro source files, we should also include command line macro definitions in the repro script. I don't have a test case for this because I'm not sure if/how I can open the crash report file when the name is only known by scraping the crash report output. Suggestions welcome if anyone thinks it'd be helpful. llvm-svn: 159592
* Use -frewrite-includes for crash reports.David Blaikie2012-06-291-1/+5
| | | | | | | | | | | In future changes we should: * use __builtin_trap rather than derefing 'random' volatile pointers. * avoid dumping temporary files into /tmp when running tests, instead preferring a location that is properly cleaned up by lit. Review by Chandler Carruth. llvm-svn: 159469
* 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
* Adjust this code so that it strictly honorsJohn McCall2012-06-211-4/+6
| | | | | | | | TargetSimulatroVersionFromDefines if present; this also makes it easier to chain things correctly. Noted by an internal review. llvm-svn: 158926
* 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
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-4/+9
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* 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-205-189/+185
| | | | | | | | | | | | | | | | | | | | | | | | 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
* [driver] Per Bob's suggestion, emphasize the file dumps.Chad Rosier2012-06-191-7/+8
| | | | | | rdar://11684107 llvm-svn: 158734
* [driver] Print the compiler version before the diagnostic messages.Chad Rosier2012-06-191-3/+3
| | | | llvm-svn: 158729
* [driver] Make the crash diagnostic message more visable. Bug reports are beingChad Rosier2012-06-191-2/+5
| | | | | | | filed, but still missing the preprocessed source and associated run script. rdar://11684107 llvm-svn: 158727
* Add a -fuse-init-array option to cc1 and map to the UseInitArray targetRafael Espindola2012-06-194-2/+14
| | | | | | | | | 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-112-0/+72
| | | | | | | | | | | | | | -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
* Zap the /Za compiler switch from MSVC projects, the option is considered ↵Francois Pichet2012-06-061-7/+0
| | | | | | | | harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed. Only 1 minor code change was necessary: can't use cdecl as variable name anymore. llvm-svn: 158063
* Remove AST and Parse from Driver's dependencies.Jordan Rose2012-06-041-1/+1
| | | | llvm-svn: 157933
* 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-292-16/+67
| | | | | | | 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
OpenPOWER on IntegriCloud