5e219cf7f896873c1c1e64b9e87a7dade99debba |
|
08-Apr-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Teach Clang about PIE compilations. This is the first step of PR12380. 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
95794225e9f80d4b45d4767e0b4b43f818c585da |
|
08-Apr-2012 |
Chandler Carruth <chandlerc@gmail.com> |
Rephrase the preprocessor test to directly use CC1 and not bother testing any of the strange driver behavior. We already have some tiny tests for the driver behavior, and I'm going to expand them greatly in the next commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
65ea45a447c1862da654e3eb56bea80f89c0d5b7 |
|
08-Apr-2012 |
Chandler Carruth <chandlerc@gmail.com> |
FileCheck-ize this test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
9ec60dfe771ff28a84889dced6f8fd3748d3d55e |
|
20-Jan-2012 |
Sebastian Pop <spop@codeaurora.org> |
rename -ccc-host-triple into -target git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
31cbe684302a5ccb001fa2131c0e4aeaa372f5c0 |
|
13-Jan-2012 |
Eli Friedman <eli.friedman@gmail.com> |
Revert r148138; it's causing test failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
edd4f3c39101912605c2a1868dd2be71aa218798 |
|
13-Jan-2012 |
Sebastian Pop <spop@codeaurora.org> |
rename -ccc-host-triple into -target git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
80737ad5e0a67d6e3dd0a0ba48446344215a5fd5 |
|
15-Dec-2009 |
Daniel Dunbar <daniel@zuster.org> |
Update tests to use %clang instead of 'clang', and forcibly disable use of ' clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
2475d76920b43014e661690836642ca3c9967179 |
|
08-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Remove RUN: true lines. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
4fcfde4d5c8f25e40720972a5543d538a0dcb220 |
|
08-Nov-2009 |
Daniel Dunbar <daniel@zuster.org> |
Eliminate &&s in tests. - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
748dd20b55f64bc7e398a3f2210136581531fc7a |
|
09-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Force triple for these tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|
9fd0b1f845a61e71dd8099f596532d34c519630a |
|
08-Apr-2009 |
Daniel Dunbar <daniel@zuster.org> |
Set __PIC__ (more) correctly. - Add -pic-level clang-cc option to specify the value for the define, updated driver to pass this. - Added __pic__ - Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Preprocessor/pic.c
|