-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathembedded-Xcc.swift
29 lines (22 loc) · 1.45 KB
/
embedded-Xcc.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %target-swift-frontend -scan-dependencies -module-name Test -module-cache-path %t/clang-module-cache -O -g \
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
// RUN: %t/main.swift -o %t/deps.json -swift-version 5 -cache-compile-job -cas-path %t/cas -Xcc -DTEST=1
// RUN: %{python} %S/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json
// RUN: llvm-cas --cas %t/cas --make-blob --data %t/map.json > %t/map.casid
// RUN: %{python} %S/Inputs/BuildCommandExtractor.py %t/deps.json Test > %t/MyApp.cmd
// RUN: echo %t/main.swift > %t/inputs.FileList
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -g -O \
// RUN: -cache-compile-job -cas-path %t/cas -swift-version 5 \
// RUN: -disable-implicit-swift-modules -swift-version 5 -enable-cross-import-overlays \
// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \
// RUN: -module-name Test -explicit-swift-module-map-file @%t/map.casid \
// RUN: -filelist %t/inputs.FileList @%t/MyApp.cmd
// RUN: llvm-bcanalyzer --dump %t/Test.swiftmodule | %FileCheck %s
// CHECK: <XCC abbrevid=6/> blob data = '-cc1'
// CHECK: <XCC abbrevid=6/> blob data = '-D'
// CHECK: <XCC abbrevid=6/> blob data = 'TEST=1'
// CHECK-NOT: <XCC abbrevid=6/> blob data = '--target=
//--- main.swift
public func test() {}