aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
AgeCommit message (Collapse)Author
2012-10-18[Options] Make Option non clang specific.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166230 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09The clang driver has a fairly fancy support for executing gcc instead ofRafael Espindola
clang itself. This dates back to clang's early days and while it looks like some of it is still used (for kext for example), other parts are probably dead. Remove the -ccc-clang-archs option and associated code. I don't think there is any remaining setup where clang doesn't support an architecture but it can expect an working gcc cross compiler to be available. A nice side effect is that tests no longer need to differentiate architectures that are included in production builds of clang and those that are not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165545 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-04Fix typo in comments.Logan Chien
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165216 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03Remove useless parameter "WantFile" from Driver::GetProgramPath().Simon Atanasyan
This parameter is useless because nowhere used explicitly and always gets its default value - "false". The patch reviewed by Rafael Espindola. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165149 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03Fix typo in comments.Logan Chien
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165105 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-28Modern objcective-C translator. When doing rewriting, Do not Fariborz Jahanian
use the integrated pre-processor, preprocess in objective-c++ mode. // rdar://12189793. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164836 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14Improve the driver title as shown in the --help message. <rdar://12297538>Bob Wilson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163870 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-20Make Option non virtual.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162231 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-08clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161546 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-07Handle null suffixes in GetTemporaryPath (PCH files don't have suffixes).Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161367 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-06PR13529: Don't crash if the driver sees an unused input file when running asRichard Smith
'clang-cpp'. For now, the test uses "REQUIRES: shell" to determine if the host system supports "ln -s", which it uses to create a 'clang-cpp' symlink. This is a bit hacky and should likely be directly supported by lit.cfg. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161317 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-31No longer emitting a PCH file when using -fsyntax-only on a header file. ↵Aaron Ballman
Fixes PR13343. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161019 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-25[driver crash diagnostics] Strip -internal-isystem and ↵Chad Rosier
-internal-externc-isystem. rdar://11949066 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160752 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-25[driver crash diagnostics] Strip -idirafter, -iprefix, -iwithprefix,Chad Rosier
-iwithprefixbefore, and -isystem options, per Matt's suggestion. rdar://11949066 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160750 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-25[driver crash diagnostics] A few enhancements:Chad Rosier
-Strip -iquote and -M options. -Quote -D options to avoid problems with command line macros that include parens. rdar://11949066 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160743 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-17[Win32] Rework crash-report since r145389.NAKAMURA Takumi
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160343 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-0980-column and whitespace.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159942 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02Include -D files in crash report repro scripts. (PR13255)David Blaikie
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159592 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29Use -frewrite-includes for crash reports.David Blaikie
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159469 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19[driver] Per Bob's suggestion, emphasize the file dumps.Chad Rosier
rdar://11684107 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158734 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19[driver] Print the compiler version before the diagnostic messages.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158729 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-19[driver] Make the crash diagnostic message more visable. Bug reports are beingChad Rosier
filed, but still missing the preprocessed source and associated run script. rdar://11684107 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158727 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-23[driver] Have the crash diagnostics print the clang version information.Chad Rosier
rdar://11518308 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157346 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-21[driver] When creating the compiler invocation out of command-lineArgyrios Kyrtzidis
arguments, force use of clang frontend for the driver. Fixes rdar://11356765. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157205 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-16Pulls diagnostics for temp file handling into the common diagnostic kinds.Manuel Klimek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156947 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-04StringRefize code because we're good even when we crash.Chad Rosier
Patch by Jordy Rose. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156172 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03[driver - crash diagnostics] Convert the flags back to an array of strings ↵Chad Rosier
and use array_lengthof. Also, append the new filename with correct preprocessed suffix. Last part of rdar://11285725 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156117 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03[driver - crash diagnostics] Only write the failing command in the script.Chad Rosier
Part of rdar://11285725 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156096 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03[driver crash diagnostics] Remove more flags that reference absolute paths thatChad Rosier
aren't necessary to reproduce the clang crash. Part of rdar://11285725 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156079 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Unify Options.td and CC1Options.td, in a first step towards unifying the ↵James Molloy
serialization logic in Frontend and Driver. Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155916 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-27[driver] Don't try to set the deployment target when there is no boundChad Rosier
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155730 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-27Fix logic such that we only call getToolChain once. No functional changeChad Rosier
intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-27Remove redundant calls to BAA->getArchName(). No functional changeChad Rosier
intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155718 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20In r135308, -save-temps was modified to prevent a temporary file fromChad Rosier
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155224 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20When generating the clang crash diagnostic script, strip out the -o flag.Chad Rosier
Add a FIXME comment. rdar://11283560 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155207 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20Add a little hack to emulate a clang crash, so the diagnostics generator can beChad Rosier
tested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155205 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-20When generating the clang crash diagnostic script, strip out the -D, -F, and -IChad Rosier
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155180 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-16use DEFAULT_SYSROOTSebastian Pop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154792 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-15Correct indentationDavid Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154774 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-07[driver] In general, the driver claims redundant args and uses the last arg.Chad Rosier
However, the '-x' option has special handling and wasn't following this paradigm. Fix it to do so by claiming the arg as we parse the '-x' option. rdar://11203340 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154231 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02Use -rewrite-legacy-objc as clang argument for translating Fariborz Jahanian
objective-c's fragile abi, Use -rewrite-objc for translating objective-c's modern abi. // rdar://11143173 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153877 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-12Update FIXME.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152579 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-07[driver] Don't try to generate diagnostic information for linker crashes.Chad Rosier
rdar://10993648 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152180 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06Whitespace.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152159 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-06Add new code migrator support for migrating existing Objective-C code to useTed Kremenek
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22Revert part of r148839 and keep DefaultTargetTriple in the form adjustedJoerg Sonnenberger
by -target and similar options. As discussed in PR 12026, the change broke support for target-prefixed tools, i.e. calling x86_64--linux-ld when compiling for x86_64--linux. Improve the test cases added originally in r149083 to not require execution, just executable files. Document the hack with appropiate FIXME comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151185 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22[driver] Add a warning for when -mcpu= is specified without an argument. ThereChad Rosier
are likely many other OPT_xxxx_EQ options that could/should be added here. rdar://10704648 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151174 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22Provide a way to disable auto-generation of preprocessed files during clang Chad Rosier
crash. This can speedup the process of generating a delta reduced test case. rdar://10905465 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151109 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20Fixing the working-directory option so that it stores the proper directory.Aaron Ballman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150960 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19Implement a -gcc-toolchain command line option that does the same asRafael Espindola
configure's --with-gcc-toolchain. The configure option is now just a default value for the command line one. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150898 91177308-0d34-0410-b5e6-96231b3b80d8