Files
swift-mirror/test/Driver/debug-prefix-map.swift
Adrian Prantl 5956b6b226 Darwin: introduce a global override for debug prefix map entries
This patch adds a new Darwin Swift driver environment variable in the spirit of
RC_DEBUG_OPTIONS, called RC_DEBUG_PREFIX_MAP, which allows a meta build tool to
add one additional -fdebug-prefix-map entry without the knowledge of the build
system.

See also https://reviews.llvm.org/D119850

rdar://85224717
2022-02-15 15:36:15 -08:00

11 lines
835 B
Swift

// RUN: not %target-swiftc_driver -debug-prefix-map old %s 2>&1 | %FileCheck %s -check-prefix CHECK-INVALID
// RUN: %target-swiftc_driver -### -debug-prefix-map old=new %s 2>&1 | %FileCheck %s -check-prefix CHECK-SIMPLE
// RUN: %target-swiftc_driver -### -debug-prefix-map old=n=ew %s 2>&1 | %FileCheck %s -check-prefix CHECK-COMPLEX
// RUN: %target-swiftc_driver -### -debug-prefix-map old= %s 2>&1 | %FileCheck %s -check-prefix CHECK-EMPTY
// RUN: env RC_DEBUG_PREFIX_MAP=old=new %target-swiftc_driver -target arm64-apple-macos12 -### %s 2>&1 | %FileCheck %s -check-prefix CHECK-SIMPLE
// CHECK-INVALID: error: values for '-debug-prefix-map' must be in the format 'original=remapped', but 'old' was provided
// CHECK-SIMPLE: debug-prefix-map old=new
// CHECK-COMPLEX: debug-prefix-map old=n=ew
// CHECK-EMPTY: debug-prefix-map old=