Skip to content

Revert "Bump the DWARF version number to 5 on Darwin." #95325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Jun 12, 2024

@fmayer fmayer added the skip-precommit-approval PR for CI feedback, not intended for review label Jun 12, 2024
@fmayer fmayer merged commit fcc4935 into main Jun 12, 2024
5 of 7 checks passed
@fmayer fmayer deleted the revert-95164-darwin-dwarf5 branch June 12, 2024 22:50
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Jun 12, 2024
@llvmbot
Copy link
Member

llvmbot commented Jun 12, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Florian Mayer (fmayer)

Changes

Reverts llvm/llvm-project#95164

This broke a buildbot: https://lab.llvm.org/buildbot/#/builders/37/builds/35987


Full diff: https://github.com/llvm/llvm-project/pull/95325.diff

2 Files Affected:

  • (modified) clang/lib/Driver/ToolChains/Darwin.cpp (+1-11)
  • (modified) clang/test/Driver/debug-options.c (+1-26)
diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
index ca75a622b061e..ed5737915aa96 100644
--- a/clang/lib/Driver/ToolChains/Darwin.cpp
+++ b/clang/lib/Driver/ToolChains/Darwin.cpp
@@ -1257,17 +1257,7 @@ unsigned DarwinClang::GetDefaultDwarfVersion() const {
   if ((isTargetMacOSBased() && isMacosxVersionLT(10, 11)) ||
       (isTargetIOSBased() && isIPhoneOSVersionLT(9)))
     return 2;
-  // Default to use DWARF 4 on OS X 10.11 - macOS 14 / iOS 9 - iOS 17.
-  if ((isTargetMacOSBased() && isMacosxVersionLT(15)) ||
-      (isTargetIOSBased() && isIPhoneOSVersionLT(18)) ||
-      (isTargetWatchOSBased() && TargetVersion < llvm::VersionTuple(11)) ||
-      (isTargetXROS() && TargetVersion < llvm::VersionTuple(2)) ||
-      (isTargetDriverKit() && TargetVersion < llvm::VersionTuple(24)) ||
-      (isTargetMacOSBased() &&
-       TargetVersion.empty()) || // apple-darwin, no version.
-      (TargetPlatform == llvm::Triple::BridgeOS))
-    return 4;
-  return 5;
+  return 4;
 }
 
 void MachO::AddLinkRuntimeLib(const ArgList &Args, ArgStringList &CmdArgs,
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
index 0a665f7017d63..07f6ca9e3902f 100644
--- a/clang/test/Driver/debug-options.c
+++ b/clang/test/Driver/debug-options.c
@@ -68,32 +68,7 @@
 // RUN: %clang -### -c -g %s -target x86_64-apple-driverkit19.0 2>&1 \
 // RUN:             | FileCheck -check-prefix=G_STANDALONE \
 // RUN:                         -check-prefix=G_DWARF4 %s
-// RUN: %clang -### -c -g %s -target x86_64-apple-macosx15 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF5 %s
-// RUN: %clang -### -c -g %s -target arm64-apple-ios17.0 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF4 %s
-// RUN: %clang -### -c -g %s -target arm64-apple-ios18.0 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF5 %s
-// RUN: %clang -### -c -g %s -target arm64_32-apple-watchos11 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF5 %s
-// RUN: %clang -### -c -g %s -target arm64-apple-tvos18.0 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF5 %s
-// RUN: %clang -### -c -g %s -target x86_64-apple-driverkit24.0 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF5 %s
-// RUN: %clang -### -c -g %s -target arm64-apple-xros1 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF4 %s
-// RUN: %clang -### -c -g %s -target arm64-apple-xros2 2>&1 \
-// RUN:             | FileCheck -check-prefix=G_STANDALONE \
-// RUN:                         -check-prefix=G_DWARF5 %s
-//
-// RUN: %clang -### -c -fsave-optimization-record %s    \
+// RUN: %clang -### -c -fsave-optimization-record %s \
 // RUN:        -target x86_64-apple-darwin 2>&1 \
 // RUN:             | FileCheck -check-prefix=GLTO_ONLY %s
 // RUN: %clang -### -c -g -fsave-optimization-record %s \

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category skip-precommit-approval PR for CI feedback, not intended for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants