summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver
Commit message (Collapse)AuthorAgeFilesLines
* test/Driver/crash-report.c: Remove "REQUIRES: shell". env(1) can be used ↵NAKAMURA Takumi2012-07-171-2/+1
| | | | | | also with gnuwin32. llvm-svn: 160362
* [Win32] Rework crash-report since r145389.NAKAMURA Takumi2012-07-171-1/+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
* test/Driver/crash-report.c: Small tweaks. 1) Use %t instead %T for TMP. 2) ↵NAKAMURA Takumi2012-07-171-4/+5
| | | | | | Set all of $TMPDIR, $TEMP and $TMP, or a certain host might set $TEMP. llvm-svn: 160342
* Add test case for tweaks to clang driver.David Chisnall2012-07-151-0/+8
| | | | llvm-svn: 160236
* Tests: check for target availability for target-specific tests.Jim Grosbach2012-07-092-0/+3
| | | | | | | | Lots of tests are using an explicit target triple w/o first checking that the target is actually available. Add a REQUIRES clause to a bunch of them. This should hopefully unbreak bots which don't configure w/ all targets enabled. llvm-svn: 159949
* objective-c: yank any use of "non-fragile abi" phraseFariborz Jahanian2012-07-091-2/+2
| | | | | | from diagnostics. // rdar://9657485 llvm-svn: 159943
* Re-apply r159875 with fixes.Ted Kremenek2012-07-071-0/+7
| | | | | | | - 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-8/+0
| | | | | | | | | | -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-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+6
| | | | | | | | | | | | | | | | | 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/+24
| | | | llvm-svn: 159769
* MIPS: Add -mips16 / -mno-mips16 command line support.Simon Atanasyan2012-07-051-0/+13
| | | | llvm-svn: 159747
* Give test check tags consistent names. Simon Atanasyan2012-07-051-9/+9
| | | | llvm-svn: 159744
* 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/+5
| | | | | | | | | | 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
* test/Driver/crash-report.c: don't fail if there are no files left behind by ↵Richard Smith2012-07-021-1/+1
| | | | | | a previous run of this test! llvm-svn: 159615
* Improve crash reporting test coverage.David Blaikie2012-07-021-2/+8
| | | | | | | | | | This adds validation that the * repro source is only rewrite-includes processed, not fully preprocessed. * repro script contains macro definitions (-DFOO=BAR). Based on suggestions/help by Matt Beaumont-Gay. llvm-svn: 159605
* test/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. ↵NAKAMURA Takumi2012-06-301-0/+1
| | | | | | Investigating. llvm-svn: 159476
* Unbreak the test from r159469.David Blaikie2012-06-291-1/+1
| | | | llvm-svn: 159474
* Use -frewrite-includes for crash reports.David Blaikie2012-06-291-0/+6
| | | | | | | | | | | 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
* [driver] Make -serialize-diagnostics (one dash) and alias forChad Rosier2012-06-261-0/+5
| | | | | | | --serialize-diagnostics. rdar://11734800 llvm-svn: 159208
* Less restrictive check in unit test for unsupported debug info optionsAlexey Samsonov2012-06-211-1/+1
| | | | llvm-svn: 158916
* Revert r158423 corresponding to r158796, "test/Driver/warning-options.cpp: ↵NAKAMURA Takumi2012-06-211-4/+0
| | | | | | Mark as XFAIL:cygming. -pedantic is passed with gcc-as driver. PR12920" llvm-svn: 158915
* Improve support for -g options accepted by Clang:Alexey Samsonov2012-06-212-36/+43
| | | | | | | | 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-5/+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-206-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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/+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
* XFAIL linker-opts.c on win32 now that it doesn't pretend that link.exe is ld.Michael J. Spencer2012-06-181-1/+1
| | | | llvm-svn: 158687
* [VS Toolchain] Correctly forward -l linker inputs to link.exe.Michael J. Spencer2012-06-181-0/+5
| | | | | | Patch by Nikola Smiljanic! llvm-svn: 158664
* For compatibility with gcc, accept -maltivec as an alias of -faltivec.Hal Finkel2012-06-171-0/+1
| | | | llvm-svn: 158613
* test/Driver/warning-options.cpp: Mark as XFAIL:cygming. -pedantic is passed ↵NAKAMURA Takumi2012-06-131-0/+3
| | | | | | with gcc-as driver. PR12920 llvm-svn: 158423
* Provide a -no-pedantic to cancel out -pedantic.John McCall2012-06-131-0/+5
| | | | llvm-svn: 158416
* Fix test to work when clang is built without powerpc64 support.Bob Wilson2012-06-121-3/+6
| | | | llvm-svn: 158370
* Add PPC support for translating gcc-style -mcpu options into LLVM ↵Hal Finkel2012-06-111-0/+20
| | | | | | | | | | | | | | -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
* supply a simple-minded testcase for r156813, to check whether the embedded ↵Gabor Greif2012-05-303-0/+11
| | | | | | montavista gcc toolchain is recognized llvm-svn: 157686
* MIPS: Pass -KPIC argument to MIPS assembler if necessary.Simon Atanasyan2012-05-291-0/+7
| | | | llvm-svn: 157635
* Make Clang driver pass the last option from -g group to the compiler.Alexey Samsonov2012-05-291-1/+19
| | | | | | Leave a better fixme for different debug info flags llvm-svn: 157602
* 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/+2
| | | | | | | | | so that the generation of implicit floating point instructions can be disable for ARM. rdar://11409142 llvm-svn: 156942
* Tweek r156937 a bit so that the suggestions are correct.Chad Rosier2012-05-161-1/+1
| | | | llvm-svn: 156938
* Warn about -Wno-foo where foo is an unknown warning option. This is helpful Chad Rosier2012-05-161-0/+6
| | | | | | | | | | | for subtle misspellings such as -Wno-unused-command-line-arguments instead of -Wno-unused-command-line-argument. Also fix the diagnostic messages to properly handle -Wno- options. Previously, the positive version was always emitted (i.e., -Wfoo was emitted for -Wno-foo). rdar://11461500 llvm-svn: 156937
* Add the Objective-C runtime linking arguments after user-specifiedDouglas Gregor2012-05-151-1/+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-0/+2
| | | | | | <rdar://problem/11433499> llvm-svn: 156841
* Teach the driver on Linux to respect -nodefaultlibs.Chandler Carruth2012-05-141-0/+8
| | | | | | Patch from Andrew C. Morrow. llvm-svn: 156771
* Update test case for new default of 3.0Chad Rosier2012-05-091-2/+2
| | | | llvm-svn: 156493
* [driver] Use the iOS target triple to infer the deployment target.Chad Rosier2012-05-091-0/+33
| | | | | | rdar://11409204 llvm-svn: 156489
* add -fbounds-checking option.Nuno Lopes2012-05-081-0/+7
| | | | | | | | 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-0/+4
| | | | | | 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/+5
| | | | | | | | | | | | | | 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
* Test case Clang::Driver/debug-options-as.c depends on the integrated ↵Simon Atanasyan2012-05-031-2/+4
| | | | | | assembler. Turn it on explicitly on all platforms by the "-integrated-as" option. llvm-svn: 156063
OpenPOWER on IntegriCloud