CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
149 lines
8.4 KiB
C++
149 lines
8.4 KiB
C++
// A basic clang -cc1 command-line. WebAssembly is somewhat special in
|
|
// enabling -fvisibility=hidden by default.
|
|
|
|
// RUN: %clangxx -### %s --target=wasm32-unknown-unknown 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=CC1 %s
|
|
// CC1: "-cc1" "-triple" "wasm32-unknown-unknown" {{.*}} "-fvisibility=hidden" {{.*}}
|
|
|
|
// Ditto, but ensure that a user -fvisibility=default disables the default
|
|
// -fvisibility=hidden.
|
|
|
|
// RUN: %clangxx -### %s --target=wasm32-unknown-unknown -fvisibility=default 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=FVISIBILITY_DEFAULT %s
|
|
// FVISIBILITY_DEFAULT-NOT: hidden
|
|
|
|
// A basic C++ link command-line with unknown OS.
|
|
|
|
// RUN: %clangxx -### --target=wasm32-unknown-unknown --sysroot=/foo --stdlib=libc++ %s 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK %s
|
|
// LINK: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// RUN: %clangxx -### --target=wasm32-unknown-unknown --sysroot=/foo --stdlib=libstdc++ %s 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK_STDCXX %s
|
|
// LINK_STDCXX: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK_STDCXX: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lstdc++" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// A basic C++ link command-line with optimization with unknown OS.
|
|
|
|
// RUN: %clangxx -### -O2 --target=wasm32-unknown-unknown --sysroot=/foo %s --stdlib=libc++ 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK_OPT %s
|
|
// LINK_OPT: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK_OPT: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// RUN: %clangxx -### -O2 --target=wasm32-unknown-unknown --sysroot=/foo %s --stdlib=libstdc++ 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK_OPT_STDCXX %s
|
|
// LINK_OPT_STDCXX: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK_OPT_STDCXX: wasm-ld{{.*}}" "-L/foo/lib" "crt1.o" "[[temp]]" "-lstdc++" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// A basic C++ link command-line with known OS.
|
|
|
|
// RUN: %clangxx -### --target=wasm32-wasi --sysroot=/foo --stdlib=libc++ %s 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK_KNOWN %s
|
|
// LINK_KNOWN: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK_KNOWN: wasm-ld{{.*}}" "-L/foo/lib/wasm32-wasi" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// RUN: %clangxx -### --target=wasm32-wasi --sysroot=/foo --stdlib=libstdc++ %s 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK_KNOWN_STDCXX %s
|
|
// LINK_KNOWN_STDCXX: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK_KNOWN_STDCXX: wasm-ld{{.*}}" "-L/foo/lib/wasm32-wasi" "crt1.o" "[[temp]]" "-lstdc++" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// A basic C++ link command-line with optimization with known OS.
|
|
|
|
// RUN: %clangxx -### -O2 --target=wasm32-wasi --sysroot=/foo %s --stdlib=libc++ 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK_OPT_KNOWN %s
|
|
// LINK_OPT_KNOWN: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK_OPT_KNOWN: wasm-ld{{.*}}" "-L/foo/lib/wasm32-wasi" "crt1.o" "[[temp]]" "-lc++" "-lc++abi" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// RUN: %clangxx -### -O2 --target=wasm32-wasi --sysroot=/foo %s --stdlib=libstdc++ 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=LINK_OPT_KNOWN_STDCXX %s
|
|
// LINK_OPT_KNOWN_STDCXX: "-cc1" {{.*}} "-o" "[[temp:[^"]*]]"
|
|
// LINK_OPT_KNOWN_STDCXX: wasm-ld{{.*}}" "-L/foo/lib/wasm32-wasi" "crt1.o" "[[temp]]" "-lstdc++" "-lc" "{{.*[/\\]}}libclang_rt.builtins.a" "-o" "a.out"
|
|
|
|
// A basic C++ compile command-line with known OS.
|
|
|
|
// RUN: %clangxx -### --target=wasm32-wasi --stdlib=libc++ %s 2>&1 \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree/usr \
|
|
// RUN: | FileCheck -check-prefix=COMPILE %s
|
|
// COMPILE: "-cc1"
|
|
// COMPILE: "-resource-dir" "[[RESOURCE_DIR:[^"]*]]"
|
|
// COMPILE: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
// COMPILE: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/c++/v1"
|
|
// COMPILE: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/v1"
|
|
// COMPILE: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
|
|
// COMPILE: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi"
|
|
// COMPILE: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
|
|
|
// RUN: %clangxx -### --target=wasm32-wasi --stdlib=libstdc++ %s 2>&1 \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libstdcxx_libcxxv2_tree/usr \
|
|
// RUN: | FileCheck -check-prefix=COMPILE_STDCXX %s
|
|
// COMPILE_STDCXX: "-cc1"
|
|
// COMPILE_STDCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]*]]"
|
|
// COMPILE_STDCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8/wasm32-wasi"
|
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8"
|
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8/backward"
|
|
// COMPILE_STDCXX: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
|
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi"
|
|
// COMPILE_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
|
|
|
// RUN: %clangxx -### --target=wasm32-linux-muslwali --stdlib=libc++ %s 2>&1 \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree/usr \
|
|
// RUN: | FileCheck -check-prefix=COMPILE_WALI %s
|
|
// COMPILE_WALI: "-cc1"
|
|
// COMPILE_WALI: "-resource-dir" "[[RESOURCE_DIR:[^"]*]]"
|
|
// COMPILE_WALI: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
// COMPILE_WALI: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-linux-muslwali/c++/v1"
|
|
// COMPILE_WALI: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/v1"
|
|
// COMPILE_WALI: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
|
|
// COMPILE_WALI: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-linux-muslwali"
|
|
// COMPILE_WALI: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
|
|
|
// RUN: %clangxx -### --target=wasm32-linux-muslwali --stdlib=libstdc++ %s 2>&1 \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libstdcxx_libcxxv2_tree/usr \
|
|
// RUN: | FileCheck -check-prefix=COMPILE_WALI_STDCXX %s
|
|
// COMPILE_WALI_STDCXX: "-cc1"
|
|
// COMPILE_WALI_STDCXX: "-resource-dir" "[[RESOURCE_DIR:[^"]*]]"
|
|
// COMPILE_WALI_STDCXX: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
// COMPILE_WALI_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8/wasm32-linux-muslwali"
|
|
// COMPILE_WALI_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8"
|
|
// COMPILE_WALI_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/4.8/backward"
|
|
// COMPILE_WALI_STDCXX: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|\\\\)}}include"
|
|
// COMPILE_WALI_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-linux-muslwali"
|
|
// COMPILE_WALI_STDCXX: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
|
|
|
// With a known OS "eh" and "noeh" directories are added to enable segregating
|
|
// object built with/without exception-handling
|
|
|
|
// RUN: %clangxx -### --target=wasm32-wasi --stdlib=libc++ %s 2>&1 \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree/usr \
|
|
// RUN: | FileCheck -check-prefix=EH_OFF %s
|
|
// EH_OFF: "-cc1"
|
|
// EH_OFF: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
// EH_OFF: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/noeh/c++/v1"
|
|
// EH_OFF-NOT: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/eh/c++/v1"
|
|
// EH_OFF: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/c++/v1"
|
|
// EH_OFF: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/v1"
|
|
// EH_OFF: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi"
|
|
// EH_OFF: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
|
|
|
// RUN: %clangxx -### --target=wasm32-wasi -fwasm-exceptions --stdlib=libc++ %s 2>&1 \
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree/usr \
|
|
// RUN: | FileCheck -check-prefix=EH_ON %s
|
|
// EH_ON: "-cc1"
|
|
// EH_ON: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
// EH_ON: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/eh/c++/v1"
|
|
// EH_ON-NOT: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/noeh/c++/v1"
|
|
// EH_ON: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi/c++/v1"
|
|
// EH_ON: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/c++/v1"
|
|
// EH_ON: "-internal-isystem" "[[SYSROOT:[^"]+]]/include/wasm32-wasi"
|
|
// EH_ON: "-internal-isystem" "[[SYSROOT:[^"]+]]/include"
|
|
//
|
|
// RUN: %clangxx -### --target=wasm32-wasi --sysroot=/foo --stdlib=libc++ %s 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=EH_OFF_LINK %s
|
|
// EH_OFF_LINK: wasm-ld{{.*}}" "-L/foo/lib/wasm32-wasi/noeh" "-L/foo/lib/wasm32-wasi"
|
|
//
|
|
// RUN: %clangxx -### --target=wasm32-wasi -fwasm-exceptions --sysroot=/foo --stdlib=libc++ %s 2>&1 \
|
|
// RUN: | FileCheck -check-prefix=EH_ON_LINK %s
|
|
// EH_ON_LINK: wasm-ld{{.*}}" "-L/foo/lib/wasm32-wasi/eh" "-L/foo/lib/wasm32-wasi"
|