summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* [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
* 80-column and whitespace.Chad Rosier2012-07-091-8/+9
| | | | llvm-svn: 159942
* 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
* [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
* [driver] Have the crash diagnostics print the clang version information.Chad Rosier2012-05-231-0/+3
| | | | | | rdar://11518308 llvm-svn: 157346
* [driver] When creating the compiler invocation out of command-lineArgyrios Kyrtzidis2012-05-211-1/+1
| | | | | | | | arguments, force use of clang frontend for the driver. Fixes rdar://11356765. llvm-svn: 157205
* Pulls diagnostics for temp file handling into the common diagnostic kinds.Manuel Klimek2012-05-161-1/+1
| | | | llvm-svn: 156947
* StringRefize code because we're good even when we crash.Chad Rosier2012-05-041-6/+6
| | | | | | Patch by Jordy Rose. llvm-svn: 156172
* [driver - crash diagnostics] Convert the flags back to an array of strings ↵Chad Rosier2012-05-031-1/+13
| | | | | | | | | and use array_lengthof. Also, append the new filename with correct preprocessed suffix. Last part of rdar://11285725 llvm-svn: 156117
* [driver - crash diagnostics] Only write the failing command in the script.Chad Rosier2012-05-031-1/+6
| | | | | | Part of rdar://11285725 llvm-svn: 156096
* [driver crash diagnostics] Remove more flags that reference absolute paths thatChad Rosier2012-05-031-3/+16
| | | | | | | aren't necessary to reproduce the clang crash. Part of rdar://11285725 llvm-svn: 156079
* Unify Options.td and CC1Options.td, in a first step towards unifying the ↵James Molloy2012-05-011-1/+1
| | | | | | | | serialization logic in Frontend and Driver. Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/ llvm-svn: 155916
* [driver] Don't try to set the deployment target when there is no boundChad Rosier2012-04-271-3/+2
| | | | | | | | | 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 llvm-svn: 155730
* Fix logic such that we only call getToolChain once. No functional changeChad Rosier2012-04-271-1/+3
| | | | | | intended. llvm-svn: 155719
* Remove redundant calls to BAA->getArchName(). No functional changeChad Rosier2012-04-271-2/+3
| | | | | | intended. llvm-svn: 155718
* In r135308, -save-temps was modified to prevent a temporary file fromChad Rosier2012-04-201-7/+16
| | | | | | | | | | | | | | | | 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 llvm-svn: 155224
* When generating the clang crash diagnostic script, strip out the -o flag.Chad Rosier2012-04-201-2/+3
| | | | | | | Add a FIXME comment. rdar://11283560 llvm-svn: 155207
* Add a little hack to emulate a clang crash, so the diagnostics generator can beChad Rosier2012-04-201-1/+1
| | | | | | tested. llvm-svn: 155205
* When generating the clang crash diagnostic script, strip out the -D, -F, and -IChad Rosier2012-04-201-0/+14
| | | | | | | | | | 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 llvm-svn: 155180
* use DEFAULT_SYSROOTSebastian Pop2012-04-161-5/+3
| | | | llvm-svn: 154792
* Correct indentationDavid Blaikie2012-04-151-22/+22
| | | | llvm-svn: 154774
* [driver] In general, the driver claims redundant args and uses the last arg.Chad Rosier2012-04-071-0/+1
| | | | | | | | 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 llvm-svn: 154231
* Use -rewrite-legacy-objc as clang argument for translating Fariborz Jahanian2012-04-021-0/+3
| | | | | | | objective-c's fragile abi, Use -rewrite-objc for translating objective-c's modern abi. // rdar://11143173 llvm-svn: 153877
* Update FIXME.Bill Wendling2012-03-121-1/+1
| | | | llvm-svn: 152579
* [driver] Don't try to generate diagnostic information for linker crashes.Chad Rosier2012-03-071-0/+4
| | | | | | rdar://10993648 llvm-svn: 152180
* Whitespace.Chad Rosier2012-03-061-1/+1
| | | | llvm-svn: 152159
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-0/+3
| | | | | | | | | | | 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. llvm-svn: 152141
* Revert part of r148839 and keep DefaultTargetTriple in the form adjustedJoerg Sonnenberger2012-02-221-0/+6
| | | | | | | | | | 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. llvm-svn: 151185
* [driver] Add a warning for when -mcpu= is specified without an argument. ThereChad Rosier2012-02-221-0/+6
| | | | | | | are likely many other OPT_xxxx_EQ options that could/should be added here. rdar://10704648 llvm-svn: 151174
* Provide a way to disable auto-generation of preprocessed files during clang Chad Rosier2012-02-221-0/+3
| | | | | | | crash. This can speedup the process of generating a delta reduced test case. rdar://10905465 llvm-svn: 151109
* Fixing the working-directory option so that it stores the proper directory.Aaron Ballman2012-02-201-5/+7
| | | | llvm-svn: 150960
* Implement a -gcc-toolchain command line option that does the same asRafael Espindola2012-02-191-10/+10
| | | | | | | configure's --with-gcc-toolchain. The configure option is now just a default value for the command line one. llvm-svn: 150898
* First pass at Solaris toolchain support. This version compiles and links helloDavid Chisnall2012-02-151-0/+3
| | | | | | | | world on Solaris 11 for both x86 and x86-64 using the built-in assembler and Solaris (not GNU) ld, however it currently relies on a hard-coded GCC location to find crtbegin.o and crtend.o, as well as libgcc and libgcc_eh. llvm-svn: 150580
* include clang's config.h unconditionally (v2)Dylan Noblesmith2012-02-141-5/+2
| | | | | | | | | | And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. Reverts r149571/restores r149504, now that config.h is generated correctly by LLVM's configure in all build configurations. llvm-svn: 150487
* When generating diagnostic information due to a clang failure, allow multipleChad Rosier2012-02-131-9/+10
| | | | | | | | | -arch options if the're all the same. Patch by Jeremy Huddleston. rdar://10849701 llvm-svn: 150403
* Correct comment Clang C++ use in production.David Blaikie2012-02-091-1/+1
| | | | | | | | | | This was from way-back-when (r82583) when Clang's C++ support wasn't prime-time yet. Production quality C++ was tested experimentally from r100119 and turned on by default in r141063. Patch by Justin Bogner. llvm-svn: 150148
* Rewrite the debug action handling to take -verify into account.Eric Christopher2012-02-061-18/+16
| | | | | | | Add a quiet option for dwarfdump and move it out of NDEBUG only. Still requires an option as we don't want this on by default. llvm-svn: 149894
* Update the command line here and update the comment, we're just goingEric Christopher2012-02-061-3/+2
| | | | | | to leave this as a debug only option for now. llvm-svn: 149890
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-3/+3
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | llvm-svn: 149798
* back out r149504Dylan Noblesmith2012-02-021-2/+5
| | | | | | Too many weird build failures. llvm-svn: 149571
* include clang's config.h unconditionallyDylan Noblesmith2012-02-011-5/+2
| | | | | | | | | | | | | And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. (clang r149497 / llvm r149498) Also include the config.h header after all other headers, per the LLVM coding standards. It also turns out WindowsToolChain.cpp wasn't using the config header at all, so that include's just deleted now. llvm-svn: 149504
* Revert r149083 which is not the direction we're going in the ClangChandler Carruth2012-01-311-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver based on discussions with Doug Gregor. There are several issues: 1) The patch was not reviewed prior to commit and there were review comments. 2) The design of the functionality (triple-prefixed tool invocation) isn't the design we want for Clang going forward: it focuses on the "user triple" rather than on the "toolchain triple", and forces that bit of state into the API of every single toolchain instead of handling it automatically in the common base classes. 3) The tests provided are not stable. They fail on a few Linux variants (Gentoo among them) and on mingw32 and some other environments. I *am* interested in the Clang driver being able to invoke triple-prefixed tools, but we need to design that feature the right way. This patch just extends the previous hack without fixing the underlying problems with it. I'm working on a new design for this that I will mail for review by tomorrow. I am aware that this removes functionality that NetBSD relies on, but this is ToT, not a release. This functionality hasn't been properly designed, implemented, and tested yet. We can't "regress" until we get something that really works, both with the immediate use cases and with long term maintenance of the Clang driver. For reference, the original commit log: Keep track of the original target the user specified before normalization. This used to be captured in DefaultTargetTriple and is used for the (optional) $triple-$tool lookup for cross-compilation. Do this properly by making it an attribute of the toolchain and use it in combination with the computed triple as index for the toolchain lookup. llvm-svn: 149337
* Keep track of the original target the user specified beforeJoerg Sonnenberger2012-01-261-22/+24
| | | | | | | | | | normalization. This used to be captured in DefaultTargetTriple and is used for the (optional) $triple-$tool lookup for cross-compilation. Do this properly by making it an attribute of the toolchain and use it in combination with the computed triple as index for the toolchain lookup. llvm-svn: 149083
* Restore a tiny bit of functionality that I completely overlooked in theChandler Carruth2012-01-251-1/+4
| | | | | | | | | | Linux toolchain selection -- sorry folks. =] This should fix the Hexagon toolchain. However, I would point out that I see why my testing didn't catch this -- we have no tests for Hexagon. ;] llvm-svn: 148977
* Remove the 'ToolTriple' concept from the NetBSD toolchain along with myChandler Carruth2012-01-251-1/+1
| | | | | | | | | | | | | | | | gross hack to provide it from my previous patch removing HostInfo. This was enshrining (and hiding from my searches) the concept of storing and diff-ing the host and target triples. We don't have the host triple reliably available, so we need to merely inspect the target system. I've changed the logic in selecting library search paths for NetBSD to match what I provided for FreeBSD -- we include both search paths, but put the 32-bit-on-64-bit-host path first so it trumps. NetBSD maintainers, you may want to tweak this, or feel free to ask me to tweak it. I've left a FIXME here about the challeng I see in fixing this properly. llvm-svn: 148952
OpenPOWER on IntegriCloud