blob: b1f5f48f874d6c2f11e2c1007e54ac44ac9042c6 [file] [log] [blame]
Dan Gohmane3d71e12016-01-07 01:00:21 +00001// A basic clang -cc1 command-line. WebAssembly is somewhat special in
Sam Clegg7892ae42018-01-31 18:55:22 +00002// enabling -fvisibility=hidden by default.
Dan Gohman4e480202016-01-07 00:32:04 +00003
Daniel Jasperd3371112016-01-07 12:53:59 +00004// RUN: %clang %s -### -no-canonical-prefixes -target wasm32-unknown-unknown 2>&1 | FileCheck -check-prefix=CC1 %s
Sam Clegg7892ae42018-01-31 18:55:22 +00005// CC1: clang{{.*}} "-cc1" "-triple" "wasm32-unknown-unknown" {{.*}} "-fvisibility" "hidden" {{.*}}
Dan Gohman4e480202016-01-07 00:32:04 +00006
Dan Gohmanfbe544e2016-01-07 01:15:05 +00007// Ditto, but ensure that a user -fvisibility=default disables the default
Dan Gohmane8a69ab2016-01-11 11:49:44 +00008// -fvisibility=hidden.
Dan Gohmanfbe544e2016-01-07 01:15:05 +00009
10// RUN: %clang %s -### -target wasm32-unknown-unknown -fvisibility=default 2>&1 | FileCheck -check-prefix=FVISIBILITY_DEFAULT %s
11// FVISIBILITY_DEFAULT-NOT: hidden
12
Dan Gohman4e480202016-01-07 00:32:04 +000013// A basic C link command-line.
14
Dan Gohman57b62c52016-02-22 19:26:15 +000015// RUN: %clang -### -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s 2>&1 | FileCheck -check-prefix=LINK %s
Dan Gohman4e480202016-01-07 00:32:04 +000016// LINK: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
Sam Clegg9bbca8c2018-01-11 22:33:50 +000017// LINK: lld{{.*}}" "-flavor" "wasm" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"
Dan Gohman4e480202016-01-07 00:32:04 +000018
Sam Clegg49581582017-09-14 22:36:44 +000019// A basic C link command-line with optimization.
Dan Gohman4e480202016-01-07 00:32:04 +000020
Dan Gohman57b62c52016-02-22 19:26:15 +000021// RUN: %clang -### -O2 -no-canonical-prefixes -target wasm32-unknown-unknown --sysroot=/foo %s 2>&1 | FileCheck -check-prefix=LINK_OPT %s
Dan Gohman4e480202016-01-07 00:32:04 +000022// LINK_OPT: clang{{.*}}" "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
Sam Clegg9bbca8c2018-01-11 22:33:50 +000023// LINK_OPT: lld{{.*}}" "-flavor" "wasm" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc" "{{.*[/\\]}}libclang_rt.builtins-wasm32.a" "-o" "a.out"