From 05fb585a364bab49f09a62d0e5a6a29f5c29c4e1 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 21 Nov 2012 23:40:23 +0000 Subject: Fix the '-fuse-init-array' option to actually be an option. Previously, this flag to CC1 was never exposed at the clang driver layer, and if you happened to enable it (by being on Android or GCC 4.7 platform), you couldn't *disable* it, because there was no 'no' variant. The whole thing was confusingly implemented. Now, the target-specific flag processing gets the driver arg list, and we use standard hasFlag with a default based on the GCC version and/or Android platform. The user can still pass the 'no-' variant to forcibly disable the flag, or pass the positive variant to clang itself to enable the flag. The test has also been substantially cleaned up and extended to cover these use cases. llvm-svn: 168473 --- clang/lib/Driver/ToolChain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Driver/ToolChain.cpp') diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index de8ed1d1c5e..8907b2ba97d 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -197,7 +197,8 @@ void ToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs, // Each toolchain should provide the appropriate include flags. } -void ToolChain::addClangTargetOptions(ArgStringList &CC1Args) const { +void ToolChain::addClangTargetOptions(const ArgList &DriverArgs, + ArgStringList &CC1Args) const { } ToolChain::RuntimeLibType ToolChain::GetRuntimeLibType( -- cgit v1.2.3