diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-19 01:26:10 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-06-19 01:26:10 +0000 |
commit | 8af669f2f1d92436fe6dc43144bb084a620e7516 (patch) | |
tree | 1a4ea8804d501c0842c7023867b52ef7a396ec43 /include/clang/Frontend/CodeGenOptions.h | |
parent | 0d3317e0a2e0adb57ce8d075ebdcb41a3f939805 (diff) |
Add a -fuse-init-array option to cc1 and map to the UseInitArray target
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CodeGenOptions.h')
-rw-r--r-- | include/clang/Frontend/CodeGenOptions.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h index be7f03fe13..6c77e424e7 100644 --- a/include/clang/Frontend/CodeGenOptions.h +++ b/include/clang/Frontend/CodeGenOptions.h @@ -118,6 +118,8 @@ public: unsigned StackRealignment : 1; ///< Control whether to permit stack ///< realignment. + unsigned UseInitArray : 1; ///< Control whether to use .init_array or + ///< .ctors. unsigned StackAlignment; ///< Overrides default stack alignment, ///< if not 0. @@ -228,6 +230,7 @@ public: StackRealignment = 0; StackAlignment = 0; BoundsChecking = 0; + UseInitArray = 0; DebugInfo = NoDebugInfo; Inlining = NoInlining; |