mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* Apply -debug-prefix-map to isysroot Previously the absolute path to the sysroot, which could differ across machines in remote build scenarios, was included in the debug info of object files: ``` !11 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !12, producer: "Swift version 5.3-dev (LLVM 93caf26adb68d37, Swift 58b2ddc65afbd60)", isOptimized: false, runtimeVersion: 5, emissionKind: FullDebug, enums: !13, imports: !14, sysroot: "/Applications/Xcode-11.5.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk", sdk: "MacOSX.sdk") ``` With this change these are included in the remapping done by `-debug-prefix-map`. * Fix test
9 lines
411 B
Swift
9 lines
411 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -sdk %t/SOME_SDK -g %s -emit-ir | %FileCheck -check-prefix=WITHOUT-PREFIX-MAP %s
|
|
// RUN: %target-swift-frontend -sdk %t/SOME_SDK -g %s -emit-ir -debug-prefix-map %t/SOME_SDK=foo | %FileCheck -check-prefix=WITH-PREFIX-MAP -implicit-check-not=SOME_SDK %s
|
|
|
|
func foo() {}
|
|
|
|
// WITHOUT-PREFIX-MAP: sysroot: "{{.*}}SOME_SDK
|
|
// WITH-PREFIX-MAP: sysroot: "foo
|