r292192 - Fix AArch64 global-merge backend option name.
Author: friss Date: Mon Jan 16 21:38:45 2017 New Revision: 292192 URL: http://llvm.org/viewvc/llvm-project?rev=292192&view=rev Log: Fix AArch64 global-merge backend option name. -mglobal-merge is translated to the appropriate backend option in the driver. r277322 changed the AArch64 option name in the backend, but the driver was never updated. Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/mglobal-merge.c Modified: cfe/trunk/lib/Driver/Tools.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=292192&r1=292191&r2=292192&view=diff == --- cfe/trunk/lib/Driver/Tools.cpp (original) +++ cfe/trunk/lib/Driver/Tools.cpp Mon Jan 16 21:38:45 2017 @@ -1363,9 +1363,9 @@ void Clang::AddAArch64TargetArgs(const A options::OPT_mno_global_merge)) { CmdArgs.push_back("-backend-option"); if (A->getOption().matches(options::OPT_mno_global_merge)) - CmdArgs.push_back("-aarch64-global-merge=false"); + CmdArgs.push_back("-aarch64-enable-global-merge=false"); else - CmdArgs.push_back("-aarch64-global-merge=true"); + CmdArgs.push_back("-aarch64-enable-global-merge=true"); } } Modified: cfe/trunk/test/Driver/mglobal-merge.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mglobal-merge.c?rev=292192&r1=292191&r2=292192&view=diff == --- cfe/trunk/test/Driver/mglobal-merge.c (original) +++ cfe/trunk/test/Driver/mglobal-merge.c Mon Jan 16 21:38:45 2017 @@ -11,7 +11,7 @@ // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s // CHECK-NGM-ARM: "-backend-option" "-arm-global-merge=false" -// CHECK-NGM-AARCH64: "-backend-option" "-aarch64-global-merge=false" +// CHECK-NGM-AARCH64: "-backend-option" "-aarch64-enable-global-merge=false" // RUN: %clang -target armv7-unknown-unknown -### -fsyntax-only %s 2> %t \ // RUN: -mglobal-merge @@ -26,7 +26,7 @@ // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s // CHECK-GM-ARM: "-backend-option" "-arm-global-merge=true" -// CHECK-GM-AARCH64: "-backend-option" "-aarch64-global-merge=true" +// CHECK-GM-AARCH64: "-backend-option" "-aarch64-enable-global-merge=true" // RUN: %clang -target armv7-unknown-unknown -### -fsyntax-only %s 2> %t // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D22463: [RFC] Moving to GitHub Proposal: NOT DECISION!
friss added inline comments. Comment at: docs/Proposals/GitHub.rst:220 @@ +219,3 @@ +8. Tell people living downstream to pick up commits from the official git + repository. +9. Give things time to settle. We could play some games like disabling the SVN vsk wrote: > This is tricky. CC'ing @friss to comment on how we'd need to update our > internal auto-merger. This is not an issue. We were already consuming the llvm.org git repos, so we'd just need to point to the new git repos (given the git history is preserved, I don't think I've read this anywhere in this document, but I think it's safe to make this assumption) https://reviews.llvm.org/D22463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r257543 - [Darwin] Fix deployment target detection
Author: friss Date: Tue Jan 12 17:47:59 2016 New Revision: 257543 URL: http://llvm.org/viewvc/llvm-project?rev=257543&view=rev Log: [Darwin] Fix deployment target detection There was a thinko in the deployment target detection code that made the -isysroot parsing have precedence over the environment variable for tvOS. This patch makes this logic symetric for all platforms (the env variable must have precedence). Modified: cfe/trunk/lib/Driver/ToolChains.cpp cfe/trunk/test/Driver/appletvos-version-min.c Modified: cfe/trunk/lib/Driver/ToolChains.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=257543&r1=257542&r2=257543&view=diff == --- cfe/trunk/lib/Driver/ToolChains.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Jan 12 17:47:59 2016 @@ -526,7 +526,7 @@ void Darwin::AddDeploymentTarget(Derived // no environment variable defined, see if we can set the default based // on -isysroot. if (OSXTarget.empty() && iOSTarget.empty() && WatchOSTarget.empty() && -Args.hasArg(options::OPT_isysroot)) { +TvOSTarget.empty() && Args.hasArg(options::OPT_isysroot)) { if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) { StringRef isysroot = A->getValue(); // Assume SDK has path: SOME_PATH/SDKs/PlatformXX.YY.sdk Modified: cfe/trunk/test/Driver/appletvos-version-min.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/appletvos-version-min.c?rev=257543&r1=257542&r2=257543&view=diff == --- cfe/trunk/test/Driver/appletvos-version-min.c (original) +++ cfe/trunk/test/Driver/appletvos-version-min.c Tue Jan 12 17:47:59 2016 @@ -2,6 +2,7 @@ // REQUIRES: aarch64-registered-target // RUN: %clang -target i386-apple-darwin10 -mappletvsimulator-version-min=9.0 -arch x86_64 -S -o - %s | FileCheck %s // RUN: %clang -target armv7s-apple-darwin10 -mappletvos-version-min=9.0 -arch arm64 -S -o - %s | FileCheck %s +// RUN: env TVOS_DEPLOYMENT_TARGET=9.0 %clang -isysroot SDKs/MacOSX10.9.sdk -target i386-apple-darwin10 -arch x86_64 -S -o - %s | FileCheck %s int main() { return 0; } // CHECK: .tvos_version_min 9, 0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D15455: [Driver] Let -static override the toolchain default PIC setting.
friss created this revision. friss added reviewers: jyknight, rnk, joerg. friss added a subscriber: cfe-commits. In r245667 -static was changed not to disable -fPIC as they control 2 different concepts. On toolchains that enable -fPIC by default, this means that now you have to pass "-static -fno-PIC" to get the previous behavior. As static usually means that we do not need PIC, this patches allows -static to override the toolchain default. You can still build all the combinations, but -static doesn't require -fno-PIC anymore on default-PIC toolchains. http://reviews.llvm.org/D15455 Files: lib/Driver/Tools.cpp test/Driver/pic.c Index: test/Driver/pic.c === --- test/Driver/pic.c +++ test/Driver/pic.c @@ -217,7 +217,7 @@ // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=5.0.0 -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=6.0.0 -static -### 2>&1 \ -// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC // // On OpenBSD, PIE is enabled by default, but can be disabled. // RUN: %clang -c %s -target amd64-pc-openbsd -### 2>&1 \ Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -3121,8 +3121,9 @@ const ArgList &Args) { // FIXME: why does this code...and so much everywhere else, use both // ToolChain.getTriple() and Triple? - bool PIE = ToolChain.isPIEDefault(); - bool PIC = PIE || ToolChain.isPICDefault(); + bool isStatic = Args.hasArg(options::OPT_static); + bool PIE = ToolChain.isPIEDefault() && !isStatic; + bool PIC = PIE || (ToolChain.isPICDefault() && !isStatic); bool IsPICLevelTwo = PIC; bool KernelOrKext = Index: test/Driver/pic.c === --- test/Driver/pic.c +++ test/Driver/pic.c @@ -217,7 +217,7 @@ // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=5.0.0 -### 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=6.0.0 -static -### 2>&1 \ -// RUN: | FileCheck %s --check-prefix=CHECK-PIC2 +// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC // // On OpenBSD, PIE is enabled by default, but can be disabled. // RUN: %clang -c %s -target amd64-pc-openbsd -### 2>&1 \ Index: lib/Driver/Tools.cpp === --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -3121,8 +3121,9 @@ const ArgList &Args) { // FIXME: why does this code...and so much everywhere else, use both // ToolChain.getTriple() and Triple? - bool PIE = ToolChain.isPIEDefault(); - bool PIC = PIE || ToolChain.isPICDefault(); + bool isStatic = Args.hasArg(options::OPT_static); + bool PIE = ToolChain.isPIEDefault() && !isStatic; + bool PIC = PIE || (ToolChain.isPICDefault() && !isStatic); bool IsPICLevelTwo = PIC; bool KernelOrKext = ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15455: [Driver] Let -static override the toolchain default PIC setting.
friss added a comment. Just because it makes the behavior more intuitive? If you toolchain does PIC by default, it's because you are mostly building shared objects. When you are building a static object, it's highly likely that you don't need PIC. There should be a way to enable it, but I find it really awkward to have to spell "clang -static -fno-PIC" to get the intuitive behavior. http://reviews.llvm.org/D15455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D15455: [Driver] Let -static override the toolchain default PIC setting.
friss added reviewers: silvas, probinson. friss added a comment. Adding some SCE people, as their platform would be impacted by that change. http://reviews.llvm.org/D15455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits