2016-01-07 09:00:21 +08:00
|
|
|
// A basic clang -cc1 command-line. WebAssembly is somewhat special in
|
2018-02-01 02:55:22 +08:00
|
|
|
// enabling -fvisibility=hidden by default.
|
2016-01-07 08:32:04 +08:00
|
|
|
|
2016-01-07 20:53:59 +08:00
|
|
|
// RUN: %clang %s -### -no-canonical-prefixes -target wasm32-unknown-unknown 2>&1 | FileCheck -check-prefix=CC1 %s
|
2018-02-01 02:55:22 +08:00
|
|
|
// CC1: clang{{.*}} "-cc1" "-triple" "wasm32-unknown-unknown" {{.*}} "-fvisibility" "hidden" {{.*}}
|
2016-01-07 08:32:04 +08:00
|
|
|
|
2016-01-07 09:15:05 +08:00
|
|
|
// Ditto, but ensure that a user -fvisibility=default disables the default
|
2016-01-11 19:49:44 +08:00
|
|
|
// -fvisibility=hidden.
|
2016-01-07 09:15:05 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### -target wasm32-unknown-unknown -fvisibility=default 2>&1 | FileCheck -check-prefix=FVISIBILITY_DEFAULT %s
|
|
|
|
// FVISIBILITY_DEFAULT-NOT: hidden
|
|
|
|
|
2016-01-07 08:32:04 +08:00
|
|
|
// A basic C link command-line.
|
|
|
|
|
2018-08-08 02:55:41 +08:00
|
|
|
// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo -fuse-ld=wasm-ld %s 2>&1 | FileCheck -check-prefix=LINK %s
|
2016-01-07 08:32:04 +08:00
|
|
|
// LINK: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
2018-08-08 02:55:41 +08:00
|
|
|
// LINK: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"
|
2016-01-07 08:32:04 +08:00
|
|
|
|
2017-09-15 06:36:44 +08:00
|
|
|
// A basic C link command-line with optimization.
|
2016-01-07 08:32:04 +08:00
|
|
|
|
2018-08-08 02:55:41 +08:00
|
|
|
// RUN: %clang -### -O2 -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo -fuse-ld=wasm-ld %s 2>&1 | FileCheck -check-prefix=LINK_OPT %s
|
2016-01-07 08:32:04 +08:00
|
|
|
// LINK_OPT: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
2018-08-08 02:55:41 +08:00
|
|
|
// LINK_OPT: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"
|