[Driver] Don't pass --enable-new-dtags to ld for Android/openSUSE
authorFangrui Song <i@maskray.me>
Sun, 28 Aug 2022 18:38:40 +0000 (11:38 -0700)
committerFangrui Song <i@maskray.me>
Sun, 28 Aug 2022 18:38:40 +0000 (11:38 -0700)
This has been the default for a very long time.

clang/lib/Driver/ToolChains/Linux.cpp
clang/test/Driver/linux-ld.c

index cf5cdbc..169daa8 100644 (file)
@@ -255,9 +255,6 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
   ExtraOpts.push_back("--build-id");
 #endif
 
-  if (IsAndroid || Distro.IsOpenSUSE())
-    ExtraOpts.push_back("--enable-new-dtags");
-
   // The selection of paths to try here is designed to match the patterns which
   // the GCC driver itself uses, as this is part of the GCC-compatible driver.
   // This was determined by running GCC in a fake filesystem, creating all
index e76b35d..10e6bee 100644 (file)
 // CHECK-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
 // CHECK-ANDROID: "-z" "now"
 // CHECK-ANDROID: "-z" "relro"
-// CHECK-ANDROID: "--enable-new-dtags"
 // CHECK-ANDROID: "{{.*}}{{/|\\\\}}crtbegin_dynamic.o"
 // CHECK-ANDROID: "-L[[SYSROOT]]/usr/lib"
 // CHECK-ANDROID-NOT: "-lgcc_s"