summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove obsolete code for finding a fallback iOS SDK. <rdar://problem/11378535>Bob Wilson2012-05-041-3/+0
| | | | llvm-svn: 156149
* Rip out old code for finding libraries in GCC's directories.Bob Wilson2012-05-031-2/+0
| | | | llvm-svn: 156058
* Driver: Turn the default value for -fmath-errno into a proper target hook ↵Benjamin Kramer2012-05-021-3/+2
| | | | | | | | | | | and disable it by default on more platforms. For now -fno-math-errno is the default on BSD-derived platforms (Darwin, DragonFlyBSD, FreeBSD, NetBSD, OpenBSD). If the default is not right for your platform, please yell. I only verified the result with the default compilers on Darwin and FreeBSD. llvm-svn: 155990
* Fix forwarding of -fpack-struct from driver to CC1, and add a test.James Molloy2012-05-021-4/+4
| | | | | | | | -fpack-struct's handling has changed in CC1 (one of only two flags that needed changing) because the driver treats "-fpack-struct" as a boolean flag, and CC1 (did) treat it as an option with a separated value. This change causes -fpack-struct=X to be forwarded correctly to -fpack-struct=X instead of erroneously to "-fpack-struct X" llvm-svn: 155981
* Fix a long-standing bug where Clang had a different default from GCC onChandler Carruth2012-04-261-8/+7
| | | | | | | | | | | | | | | Linux and other (non-Darwin) platforms and have it use -fmath-errno by default (for better or worse). Darwin has seen the light here and uses -fno-math-errno by default, this patch preserves that. If any maintainers for a non-Linux platform would also like to opt-in to -fno-math-errno by default, I'm happy to add folks, but we're currently getting buts and misleading comparisons with GCC due to this difference in behavior on Linux at least. llvm-svn: 155607
* Clang driver support for linking on Android.Evgeniy Stepanov2012-04-251-36/+60
| | | | llvm-svn: 155541
* Fix default cpu for -march=armv5e.Evgeniy Stepanov2012-04-251-1/+1
| | | | llvm-svn: 155540
* Only pass -mcpu, -march, -mfpu to linux-as on ARM.Evgeniy Stepanov2012-04-241-4/+4
| | | | llvm-svn: 155431
* Revert r155363, due to the underlying patches in LLVM causing regressionChandler Carruth2012-04-231-6/+0
| | | | | | test suite failures. llvm-svn: 155371
* Hexagon V5 (floating point) support in cfe.Sirish Pande2012-04-231-0/+6
| | | | llvm-svn: 155363
* Link with Foundation whenever -fobjc-link-runtime is used. <rdar://10976177>Bob Wilson2012-04-211-2/+2
| | | | | | | The check for excluding libarclite on i386 MacOSX should not apply to Foundation. llvm-svn: 155263
* Pass -mfloat-abi= to linuxtools assembler.Evgeniy Stepanov2012-04-201-0/+4
| | | | llvm-svn: 155191
* Revert some Hexagon builtin commits to match reverts done to LLVM inChandler Carruth2012-04-181-6/+0
| | | | | | | | | | | | | | | | | | | r155047. See the LLVM log for the primary motivation: http://llvm.org/viewvc/llvm-project?rev=155047&view=rev Primary commit r154828: - Several issues were raised in review, and fixed in subsequent commits. - Follow-up commits also reverted, and which should be folded into the original before reposting: - r154837: Re-add the 'undef BUILTIN' thing to fix the build. - r154928: Fix build warnings, re-add (and correct) header and license - r154937: Typo fix. Please resubmit this patch with the relevant LLVM resubmission. llvm-svn: 155048
* Hexagon V5(Floating Point) support.Sirish Pande2012-04-161-0/+6
| | | | llvm-svn: 154828
* use DEFAULT_SYSROOTSebastian Pop2012-04-161-4/+6
| | | | llvm-svn: 154792
* Don't link lib[std]c++ when -nostdlib is specified (Solaris driver).David Chisnall2012-04-101-2/+2
| | | | | | Patch by Dmitri Shubin! llvm-svn: 154392
* Pass -march, -mcpu, -mfpu to linuxtools assembler.Evgeniy Stepanov2012-04-101-0/+4
| | | | llvm-svn: 154389
* Fix an annoying little bug I found while debugging another LTO issue. GoldRafael Espindola2012-04-091-6/+9
| | | | | | | | | requires the -plugin to come before any -plugin-opt options, we were passing them the other way around. With this one can run (for example): clang -o foo foo.c -O4 -Wl,-plugin-opt=generate-api-file llvm-svn: 154357
* objective-c: remove -fobjc-default-synthesize-properties from the driver.Fariborz Jahanian2012-04-091-2/+1
| | | | | | | cc1 option remains though to invoke default property synthesis. // rdar://11209719 llvm-svn: 154334
* objective-c: Remove -fno-objc-default-synthesize-propertiesFariborz Jahanian2012-04-091-3/+2
| | | | | | | as the driver option. // rdar://11209719 llvm-svn: 154331
* Revert r154321, pending more discussion.David Chisnall2012-04-091-4/+0
| | | | llvm-svn: 154327
* Add -fobjc-trace to emit a call before and after each Objective-C message sendDavid Chisnall2012-04-091-0/+4
| | | | | | for hooking in code flow visualisation applications. llvm-svn: 154321
* Factor out ARM floating ABI determination to new routine Anton Korobeynikov2012-04-091-35/+44
| | | | llvm-svn: 154318
* Teach Clang about PIE compilations. This is the first step of PR12380.Chandler Carruth2012-04-081-18/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, this patch cleans up the parsing of the PIC and PIE family of options in the driver. The existing logic failed to claim arguments all over the place resulting in kludges that marked the options as unused. Instead actually walk all of the arguments and claim them properly. We now treat -f{,no-}{pic,PIC,pie,PIE} as a single set, accepting the last one on the commandline. Previously there were lots of ordering bugs that could creep in due to the nature of the parsing. Let me know if folks would like weird things such as "-fPIE -fno-pic" to turn on PIE, but disable full PIC. This doesn't make any sense to me, but we could in theory support it. Options that seem to have intentional "trump" status (-static, -mkernel, etc) continue to do so and are commented as such. Next, a -pie-level flag is threaded into the frontend, rigged to a language option, and handled preprocessor, setting up the appropriate defines. We'll now have the correct defines when compiling with -fpie. The one place outside of the preprocessor that was inspecting the PIC level (as opposed to the relocation model, which is set and handled separately, yay!) is in the GNU ObjC runtime. I changed it to exactly preserve existing behavior. If folks want to change its behavior in the face of PIE, they can do that in a separate patch. Essentially the only functionality changed here is the preprocessor defines and bug-fixes to the argument management. Tests have been updated and extended to test all of this a bit more thoroughly. llvm-svn: 154291
* MIPS: Pass -mabi option to the assmbler when compile MIPS targets.Simon Atanasyan2012-04-071-10/+14
| | | | llvm-svn: 154270
* MIPS: Move code calculates CPU and ABI names to the separate function to ↵Simon Atanasyan2012-04-071-13/+21
| | | | | | reuse this function later. llvm-svn: 154269
* MIPS: Provide a correct path to the dynamic linker when build for MIPS ↵Simon Atanasyan2012-04-061-0/+3
| | | | | | 64-bit targets. llvm-svn: 154200
* MIPS: Pass -EB/-EL argument to the assembler according to selected endian ↵Simon Atanasyan2012-04-061-0/+6
| | | | | | when compile for MIPS targets. llvm-svn: 154195
* Honor -fno-pic, -fno-PIC, -fno-pie, -fno-PIE.Nico Weber2012-04-041-1/+5
| | | | | | Review at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120402/055759.html llvm-svn: 154064
* [driver] When using the -mfpmath= option, add an error message when trying to Chad Rosier2012-04-041-3/+9
| | | | | | | enable neonfp on a CPU that doesn't support NEON. rdar://11108618 llvm-svn: 154061
* Test commit to check commit access.Simon Atanasyan2012-04-041-1/+0
| | | | llvm-svn: 154056
* Whitespace.Chad Rosier2012-04-041-2/+2
| | | | llvm-svn: 154050
* [driver] Add a static helper function for handling -mfpu= to remove some codeChad Rosier2012-04-041-76/+45
| | | | | | duplication. No functional change intended. llvm-svn: 154049
* Reduce variable scope.David Blaikie2012-04-041-2/+1
| | | | llvm-svn: 154047
* [driver] Create a new -mfpmath= option, which is used to control whether clangChad Rosier2012-04-041-0/+25
| | | | | | | | | | | uses Neon instructions for single-precision FP. -mfpmath=neon is analogous to passing llc -mattr=+neonfp. -mfpmath=[vfp|vfp2|vfp3|vfp4] is analogous to passing llc -mattr=-neonfp. rdar://11108618 llvm-svn: 154046
* modern objc translator. Add moreFariborz Jahanian2012-04-041-4/+9
| | | | | | | rewriter specific option to cc1 with -rewrite-objc. // rdar://11143173 llvm-svn: 154037
* Remove unused argument.Fariborz Jahanian2012-04-041-2/+2
| | | | llvm-svn: 154035
* Use -rewrite-legacy-objc as clang argument for translating Fariborz Jahanian2012-04-021-0/+2
| | | | | | | objective-c's fragile abi, Use -rewrite-objc for translating objective-c's modern abi. // rdar://11143173 llvm-svn: 153877
* Ignore unused --serialize-diagnostics option when using llvm-gcc.Bob Wilson2012-04-011-0/+3
| | | | | | | | | llvm-gcc doesn't handle --serialize-diagnostics so when compiling i386 kernel/kext code with -Werror, you get an error about that option being unused. Claim the argument to prevent this from breaking builds. <rdar://problem/11161933> llvm-svn: 153854
* ARM backend knows about cortex-m4. The front end should too.Jim Grosbach2012-03-291-0/+1
| | | | llvm-svn: 153678
* Move the emission of strict enum range metadata behind a flag (the sameChandler Carruth2012-03-271-0/+3
| | | | | | | | | | | | | | | | | | | | | flag as GCC uses: -fstrict-enums). There is a *lot* of code making unwarranted assumptions about the underlying type of enums, and it doesn't seem entirely reasonable to eagerly break all of it. Much more importantly, the current state of affairs is *very* good at optimizing based upon this information, which causes failures that are very distant from the actual enum. Before we push for enabling this by default, I think we need to implement -fcatch-undefined-behavior support for instrumenting and trapping whenever we store or load a value outside of the range. That way we can track down the misbehaving code very quickly. I discussed this with Rafael, and currently the only important cases he is aware of are the bool range-based optimizations which are staying hard enabled. We've not seen any issue with those either, and they are much more important for performance. llvm-svn: 153550
* [driver] Fix unused argument warnings.Chad Rosier2012-03-261-11/+19
| | | | | | | | | | | | 1. Don't short-circuit conditional statements that are checking flags. Otherwise, the driver emits warnings about unused arguments. 2. -mkernel and -fapple-kext imply no exceptions, so claim exception related arguments now to avoid warnings about unused arguments. rdar://11120518 llvm-svn: 153478
* [driver] -mkernel implies -fno-common, so claim the arg to avoid an unusedChad Rosier2012-03-261-0/+1
| | | | | | | argument warning. Part of rdar://11120518 llvm-svn: 153470
* [driver] -mkernel implies -fno-builtin, so claim the arg to avoid an unusedChad Rosier2012-03-261-0/+1
| | | | | | | argument warning. Part of rdar://11120518 llvm-svn: 153469
* Add support for MIPS' floating ABIs (hard, soft and single) to clang driver.Akira Hatanaka2012-03-231-9/+35
| | | | | | Patch by Simon Atanasyan. llvm-svn: 153348
* Duplicated code is bad. At least make it consistent.Bob Wilson2012-03-211-0/+2
| | | | | | | | | | The getARMTargetCPU and getLLVMArchSuffixForARM functions exist in both Toolchain.cpp and Tools.cpp. This stuff needs a thorough overhaul. In the meantime, this patch at least makes them consistent. One version had been converted to use StringSwitch, and the other version had new Cortex M-series processors added. llvm-svn: 153202
* Fix a regression where ':' in CPLUS_INCLUDE_PATH and friends would no longer ↵Nico Weber2012-03-191-2/+2
| | | | | | | | separate paths. This regressed in r152583. Also add a test to make sure it doesn't regress again. llvm-svn: 153034
* [frontend] Fix how the frontend handles -fno-inline. AFAIK clang now matchesChad Rosier2012-03-151-0/+3
| | | | | | | the behavior of gcc with respect to the -fno-inline and -fno-inline-functions flags. llvm-svn: 152861
OpenPOWER on IntegriCloud