From 1f5215668a2bbf34a915f0e3a4e2ca65e28915c7 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 25 Aug 2022 19:30:21 -0700 Subject: [PATCH] [Driver][test] Replace legacy -target with --target= --- clang/test/Driver/fsanitize.c | 686 ++++++++++----------- clang/test/Driver/hip-binding.hip | 16 +- clang/test/Driver/hip-code-object-version.hip | 24 +- clang/test/Driver/hip-cuid-hash.hip | 8 +- clang/test/Driver/hip-cuid.hip | 10 +- clang/test/Driver/hip-device-compile.hip | 20 +- clang/test/Driver/hip-device-libs.hip | 48 +- clang/test/Driver/hip-fpie-option.hip | 12 +- clang/test/Driver/hip-gsplit-dwarf-options.hip | 8 +- clang/test/Driver/hip-gz-options.hip | 4 +- clang/test/Driver/hip-host-cpu-features.hip | 6 +- clang/test/Driver/hip-include-path.hip | 8 +- clang/test/Driver/hip-inputs.hip | 6 +- clang/test/Driver/hip-invalid-target-id.hip | 16 +- clang/test/Driver/hip-launch-api.hip | 6 +- clang/test/Driver/hip-link-bundle-archive.hip | 4 +- clang/test/Driver/hip-link-save-temps.hip | 8 +- clang/test/Driver/hip-link-shared-library.hip | 2 +- clang/test/Driver/hip-link-static-library.hip | 6 +- clang/test/Driver/hip-no-device-libs.hip | 2 +- clang/test/Driver/hip-offload-arch.hip | 2 +- clang/test/Driver/hip-output-file-name.hip | 26 +- clang/test/Driver/hip-phases.hip | 90 +-- clang/test/Driver/hip-printf.hip | 2 +- clang/test/Driver/hip-rdc-device-only.hip | 12 +- clang/test/Driver/hip-runtime-libs-linux.hip | 12 +- clang/test/Driver/hip-runtime-libs-msvc.hip | 2 +- clang/test/Driver/hip-sanitize-options.hip | 18 +- clang/test/Driver/hip-save-temps.hip | 12 +- clang/test/Driver/hip-std.hip | 8 +- clang/test/Driver/hip-target-id.hip | 10 +- clang/test/Driver/hip-toolchain-device-only.hip | 2 +- clang/test/Driver/hip-toolchain-dwarf.hip | 2 +- clang/test/Driver/hip-toolchain-features.hip | 24 +- clang/test/Driver/hip-toolchain-mllvm.hip | 4 +- clang/test/Driver/hip-toolchain-no-rdc.hip | 8 +- clang/test/Driver/hip-toolchain-opt.hip | 16 +- clang/test/Driver/hip-toolchain-rdc-separate.hip | 8 +- clang/test/Driver/hip-toolchain-rdc-static-lib.hip | 2 +- clang/test/Driver/hip-toolchain-rdc.hip | 4 +- clang/test/Driver/hip-unbundle-preproc.hip | 4 +- clang/test/Driver/hip-version.hip | 6 +- clang/test/Driver/hip-wavefront-size.hip | 6 +- clang/test/Driver/hip-windows-filename.hip | 2 +- clang/test/Driver/mcmodel.c | 16 +- 45 files changed, 599 insertions(+), 599 deletions(-) diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c index 16e269e..1756a5d 100644 --- a/clang/test/Driver/fsanitize.c +++ b/clang/test/Driver/fsanitize.c @@ -1,25 +1,25 @@ -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined -fno-sanitize-trap=signed-integer-overflow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP2 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP -// RUN: %clang -target x86_64-linux-gnu -fsanitize-undefined-trap-on-error -fsanitize=undefined-trap %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP -// RUN: %clang -target x86_64-linux-gnu -fsanitize-trap -fsanitize=undefined-trap %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-trap=undefined -fno-sanitize-trap=signed-integer-overflow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-undefined-trap-on-error -fsanitize=undefined-trap %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-trap -fsanitize=undefined-trap %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP // CHECK-UNDEFINED-TRAP-NOT: -fsanitize-recover // CHECK-UNDEFINED-TRAP: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute|function),?){18}"}} // CHECK-UNDEFINED-TRAP: "-fsanitize-trap=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,function,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound" // CHECK-UNDEFINED-TRAP2: "-fsanitize-trap=alignment,array-bounds,bool,builtin,enum,float-cast-overflow,function,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,unreachable,vla-bound" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED // CHECK-UNDEFINED: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|function|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|vptr|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){19}"}} -// RUN: %clang -target x86_64-apple-darwin10 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-DARWIN +// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-DARWIN // CHECK-UNDEFINED-DARWIN: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|function|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){18}"}} -// RUN: %clang -target i386-pc-win32 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN32,CHECK-UNDEFINED-MSVC -// RUN: %clang -target i386-pc-win32 -fsanitize=undefined -x c++ %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN32,CHECK-UNDEFINED-WIN-CXX,CHECK-UNDEFINED-MSVC -// RUN: %clang -target x86_64-pc-win32 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN64,CHECK-UNDEFINED-MSVC -// RUN: %clang -target x86_64-w64-mingw32 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-WIN64-MINGW -// RUN: %clang -target x86_64-pc-win32 -fsanitize=undefined -x c++ %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN64,CHECK-UNDEFINED-WIN-CXX,CHECK-UNDEFINED-MSVC +// RUN: %clang --target=i386-pc-win32 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN32,CHECK-UNDEFINED-MSVC +// RUN: %clang --target=i386-pc-win32 -fsanitize=undefined -x c++ %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN32,CHECK-UNDEFINED-WIN-CXX,CHECK-UNDEFINED-MSVC +// RUN: %clang --target=x86_64-pc-win32 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN64,CHECK-UNDEFINED-MSVC +// RUN: %clang --target=x86_64-w64-mingw32 -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-WIN64-MINGW +// RUN: %clang --target=x86_64-pc-win32 -fsanitize=undefined -x c++ %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-UNDEFINED-WIN64,CHECK-UNDEFINED-WIN-CXX,CHECK-UNDEFINED-MSVC // CHECK-UNDEFINED-WIN32: "--dependent-lib={{[^"]*}}ubsan_standalone{{(-i386)?}}.lib" // CHECK-UNDEFINED-WIN64: "--dependent-lib={{[^"]*}}ubsan_standalone{{(-x86_64)?}}.lib" // CHECK-UNDEFINED-WIN64-MINGW: "--dependent-lib={{[^"]*}}libclang_rt.ubsan_standalone{{(-x86_64)?}}.a" @@ -27,12 +27,12 @@ // CHECK-UNDEFINED-MSVC-SAME: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){17}"}} // CHECK-UNDEFINED-WIN64-MINGW-SAME: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute|vptr),?){18}"}} -// RUN: %clang -target i386-pc-win32 -fsanitize-coverage=bb %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-COVERAGE-WIN32 +// RUN: %clang --target=i386-pc-win32 -fsanitize-coverage=bb %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-COVERAGE-WIN32 // CHECK-COVERAGE-WIN32: "--dependent-lib={{[^"]*}}ubsan_standalone{{(-i386)?}}.lib" -// RUN: %clang -target x86_64-pc-win32 -fsanitize-coverage=bb %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-COVERAGE-WIN64 +// RUN: %clang --target=x86_64-pc-win32 -fsanitize-coverage=bb %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-COVERAGE-WIN64 // CHECK-COVERAGE-WIN64: "--dependent-lib={{[^"]*}}ubsan_standalone{{(-x86_64)?}}.lib" -// RUN: %clang -target %itanium_abi_triple -fsanitize=integer %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-INTEGER -implicit-check-not="-fsanitize-address-use-after-scope" +// RUN: %clang --target=%itanium_abi_triple -fsanitize=integer %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-INTEGER -implicit-check-not="-fsanitize-address-use-after-scope" // CHECK-INTEGER: "-fsanitize={{((signed-integer-overflow|unsigned-integer-overflow|integer-divide-by-zero|shift-base|shift-exponent|implicit-unsigned-integer-truncation|implicit-signed-integer-truncation|implicit-integer-sign-change|unsigned-shift-base),?){9}"}} // RUN: %clang -fsanitize=implicit-conversion %s -### 2>&1 | FileCheck %s --check-prefixes=CHECK-implicit-conversion,CHECK-implicit-conversion-RECOVER @@ -83,509 +83,509 @@ // RUN: %clang -fsanitize=bounds -### -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK-BOUNDS // CHECK-BOUNDS: "-fsanitize={{((array-bounds|local-bounds),?){2}"}} -// RUN: %clang -target x86_64-linux-gnu -fsanitize=all %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSANITIZE-ALL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=all %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSANITIZE-ALL // CHECK-FSANITIZE-ALL: error: unsupported argument 'all' to option '-fsanitize=' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,undefined -fno-sanitize=all -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FNO-SANITIZE-ALL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,undefined -fno-sanitize=all -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FNO-SANITIZE-ALL // CHECK-FNO-SANITIZE-ALL: "-fsanitize=thread" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread,undefined -fno-sanitize=thread -fno-sanitize=float-cast-overflow,vptr,bool,builtin,enum %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PARTIAL-UNDEFINED +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread,undefined -fno-sanitize=thread -fno-sanitize=float-cast-overflow,vptr,bool,builtin,enum %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PARTIAL-UNDEFINED // CHECK-PARTIAL-UNDEFINED: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|function|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|array-bounds|returns-nonnull-attribute|nonnull-attribute),?){14}"}} // RUN: %clang -fsanitize=shift -fno-sanitize=shift-base %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSANITIZE-SHIFT-PARTIAL // CHECK-FSANITIZE-SHIFT-PARTIAL: "-fsanitize=shift-exponent" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fsanitize-trap=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF -// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=vptr -fsanitize-trap=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=vptr -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF // CHECK-VPTR-TRAP-UNDEF: error: invalid argument '-fsanitize=vptr' not allowed with '-fsanitize-trap=undefined' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-NO-RTTI +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=vptr -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-NO-RTTI // CHECK-VPTR-NO-RTTI: '-fsanitize=vptr' not allowed with '-fno-rtti' // RUN: %clang -fsanitize=undefined -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-NO-RTTI // CHECK-UNDEFINED-NO-RTTI-NOT: vptr -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANT +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANT // CHECK-SANA-SANT: '-fsanitize=address' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANM +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANM // CHECK-SANA-SANM: '-fsanitize=address' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANT-SANM +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANT-SANM // CHECK-SANT-SANM: '-fsanitize=thread' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANM-SANT +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANM-SANT // CHECK-SANM-SANT: '-fsanitize=thread' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=leak,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANT +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=leak,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANT // CHECK-SANL-SANT: '-fsanitize=leak' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=leak,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANM +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=leak,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANM // CHECK-SANL-SANM: '-fsanitize=leak' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-memory,address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-ASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-ASAN // CHECK-KMSAN-ASAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-memory,hwaddress -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-HWASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,hwaddress -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-HWASAN // CHECK-KMSAN-HWASAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=hwaddress' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-memory,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-LSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-LSAN // CHECK-KMSAN-LSAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=leak' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-TSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-TSAN // CHECK-KMSAN-TSAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-memory,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-KASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-KASAN // CHECK-KMSAN-KASAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=kernel-address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-memory,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-MSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-MSAN // CHECK-KMSAN-MSAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-memory,safe-stack -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-SAFESTACK +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,safe-stack -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-SAFESTACK // CHECK-KMSAN-SAFESTACK: '-fsanitize=kernel-memory' not allowed with '-fsanitize=safe-stack' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANT +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANT // CHECK-SANKA-SANT: '-fsanitize=kernel-address' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANM +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANM // CHECK-SANKA-SANM: '-fsanitize=kernel-address' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-address,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANA +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANA // CHECK-SANKA-SANA: '-fsanitize=kernel-address' not allowed with '-fsanitize=address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-address,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANL // CHECK-SANKA-SANL: '-fsanitize=kernel-address' not allowed with '-fsanitize=leak' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANT +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANT // CHECK-SANKHA-SANT: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANM +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANM // CHECK-SANKHA-SANM: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANA +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANA // CHECK-SANKHA-SANA: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-hwaddress,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANL // CHECK-SANKHA-SANL: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=leak' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-hwaddress,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANHA +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANHA // CHECK-SANKHA-SANHA: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=hwaddress' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kernel-hwaddress,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANKA +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANKA // CHECK-SANKHA-SANKA: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=kernel-address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANT +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANT // CHECK-SANHA-SANT: '-fsanitize=hwaddress' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANM +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANM // CHECK-SANHA-SANM: '-fsanitize=hwaddress' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANA +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANA // CHECK-SANHA-SANA: '-fsanitize=hwaddress' not allowed with '-fsanitize=address' -// RUN: %clang -target aarch64-linux-android -fsanitize=memtag,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANA +// RUN: %clang --target=aarch64-linux-android -fsanitize=memtag,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANA // CHECK-SANMT-SANA: '-fsanitize=memtag' not allowed with '-fsanitize=address' -// RUN: %clang -target aarch64-linux-android -fsanitize=memtag,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANHA +// RUN: %clang --target=aarch64-linux-android -fsanitize=memtag,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANHA // CHECK-SANMT-SANHA: '-fsanitize=memtag' not allowed with '-fsanitize=hwaddress' -// RUN: %clang -target i386-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH -// RUN: %clang -target x86_64-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH +// RUN: %clang --target=i386-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH +// RUN: %clang --target=x86_64-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH // CHECK-SANMT-BAD-ARCH: unsupported option '-fsanitize=memtag' for target -// RUN: %clang -target aarch64-linux-android31 -fsanitize=memtag -march=armv8-a+memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-MT +// RUN: %clang --target=aarch64-linux-android31 -fsanitize=memtag -march=armv8-a+memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-MT // CHECK-SANMT-MT: "-target-feature" "+mte" // CHECK-SANMT-MT-SAME: "-fsanitize=memtag-stack,memtag-heap,memtag-globals" -// RUN: %clang -target aarch64-linux -fsanitize=memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-0 +// RUN: %clang --target=aarch64-linux -fsanitize=memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-0 // CHECK-SANMT-NOMT-0: '-fsanitize=memtag-stack' requires hardware support (+memtag) -// RUN: %clang -target aarch64-linux -fsanitize=memtag -I +mte %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-1 +// RUN: %clang --target=aarch64-linux -fsanitize=memtag -I +mte %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-1 // CHECK-SANMT-NOMT-1: '-fsanitize=memtag-stack' requires hardware support (+memtag) -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fsanitize-address-use-after-scope -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE // CHECK-USE-AFTER-SCOPE: -cc1{{.*}}-fsanitize-address-use-after-scope -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-OFF // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fno-sanitize-address-use-after-scope -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-OFF // CHECK-USE-AFTER-SCOPE-OFF-NOT: -cc1{{.*}}address-use-after-scope -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-after-scope -fsanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-BOTH +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-after-scope -fsanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-BOTH // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fno-sanitize-address-use-after-scope -fsanitize-address-use-after-scope -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-BOTH // CHECK-USE-AFTER-SCOPE-BOTH: -cc1{{.*}}-fsanitize-address-use-after-scope -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-after-scope -fno-sanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-BOTH-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-after-scope -fno-sanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE-BOTH-OFF // CHECK-USE-AFTER-SCOPE-BOTH-OFF-NOT: -cc1{{.*}}address-use-after-scope -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-WITHOUT-USE-AFTER-SCOPE +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-WITHOUT-USE-AFTER-SCOPE // CHECK-ASAN-WITHOUT-USE-AFTER-SCOPE: -cc1{{.*}}address-use-after-scope -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fsanitize-address-poison-custom-array-cookie -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE // CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE: -cc1{{.*}}-fsanitize-address-poison-custom-array-cookie -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-OFF // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fno-sanitize-address-poison-custom-array-cookie -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-OFF // CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-OFF-NOT: -cc1{{.*}}address-poison-custom-array-cookie -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-poison-custom-array-cookie -fsanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-BOTH +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-poison-custom-array-cookie -fsanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-BOTH // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fno-sanitize-address-poison-custom-array-cookie -fsanitize-address-poison-custom-array-cookie -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-BOTH // CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-BOTH: -cc1{{.*}}-fsanitize-address-poison-custom-array-cookie -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-poison-custom-array-cookie -fno-sanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-BOTH-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-poison-custom-array-cookie -fno-sanitize-address-poison-custom-array-cookie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-BOTH-OFF // CHECK-POISON-CUSTOM-ARRAY-NEW-COOKIE-BOTH-OFF-NOT: -cc1{{.*}}address-poison-custom-array-cookie -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-WITHOUT-POISON-CUSTOM-ARRAY-NEW-COOKIE +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-WITHOUT-POISON-CUSTOM-ARRAY-NEW-COOKIE // CHECK-ASAN-WITHOUT-POISON-CUSTOM-ARRAY-NEW-COOKIE-NOT: -cc1{{.*}}address-poison-custom-array-cookie -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-globals-dead-stripping %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ASAN-GLOBALS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-globals-dead-stripping -fno-sanitize-address-globals-dead-stripping %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ASAN-GLOBALS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-globals-dead-stripping %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ASAN-GLOBALS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-globals-dead-stripping -fno-sanitize-address-globals-dead-stripping %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-ASAN-GLOBALS // RUN: %clang_cl --target=x86_64-windows-msvc -fsanitize=address -fsanitize-address-globals-dead-stripping -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS // RUN: %clang_cl --target=x86_64-windows-msvc -fsanitize=address -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-GLOBALS // CHECK-ASAN-GLOBALS: -cc1{{.*}}-fsanitize-address-globals-dead-stripping // CHECK-NO-ASAN-GLOBALS-NOT: -cc1{{.*}}-fsanitize-address-globals-dead-stripping -// RUN: %clang -target x86_64-linux-gnu -fsanitize-address-outline-instrumentation %s -### 2>&1 | \ +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-address-outline-instrumentation %s -### 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-ASAN-OUTLINE-WARN // CHECK-ASAN-OUTLINE-WARN: warning: argument unused during compilation: '-fsanitize-address-outline-instrumentation' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-outline-instrumentation %s -### 2>&1 | \ +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-outline-instrumentation %s -### 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-ASAN-OUTLINE-OK -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-outline-instrumentation -fsanitize-address-outline-instrumentation %s -### 2>&1 | \ +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-outline-instrumentation -fsanitize-address-outline-instrumentation %s -### 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-ASAN-OUTLINE-OK // CHECK-ASAN-OUTLINE-OK: "-mllvm" "-asan-instrumentation-with-call-threshold=0" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-outline-instrumentation %s -### 2>&1 | \ +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-outline-instrumentation %s -### 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-NO-CHECK-ASAN-CALLBACK -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-outline-instrumentation -fno-sanitize-address-outline-instrumentation %s -### 2>&1 | \ +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-outline-instrumentation -fno-sanitize-address-outline-instrumentation %s -### 2>&1 | \ // RUN: FileCheck %s --check-prefix=CHECK-NO-CHECK-ASAN-CALLBACK // CHECK-NO-CHECK-ASAN-CALLBACK-NOT: "-mllvm" "-asan-instrumentation-with-call-threshold=0" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fsanitize-address-use-odr-indicator -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR // CHECK-ASAN-ODR-INDICATOR: -cc1{{.*}}-fsanitize-address-use-odr-indicator -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-OFF // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fno-sanitize-address-use-odr-indicator -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-OFF // CHECK-ASAN-ODR-INDICATOR-OFF-NOT: -cc1{{.*}}address-generate-odr-globals -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-odr-indicator -fsanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-BOTH +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fno-sanitize-address-use-odr-indicator -fsanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-BOTH // RUN: %clang_cl --target=x86_64-windows -fsanitize=address -fno-sanitize-address-use-odr-indicator -fsanitize-address-use-odr-indicator -### -- %s 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-BOTH // CHECK-ASAN-ODR-INDICATOR-BOTH: -cc1{{.*}}-fsanitize-address-use-odr-indicator -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-odr-indicator -fno-sanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-BOTH-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-odr-indicator -fno-sanitize-address-use-odr-indicator %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ODR-INDICATOR-BOTH-OFF // CHECK-ASAN-ODR-INDICATOR-BOTH-OFF-NOT: -cc1{{.*}}address-generate-odr-globals -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-WITHOUT-ODR-INDICATOR +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-WITHOUT-ODR-INDICATOR // CHECK-ASAN-WITHOUT-ODR-INDICATOR-NOT: -cc1{{.*}}address-generate-odr-globals -// RUN: %clang -target x86_64-linux-gnu -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ONLY-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ONLY-TRACK-ORIGINS // CHECK-ONLY-TRACK-ORIGINS: warning: argument unused during compilation: '-fsanitize-memory-track-origins' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fno-sanitize=memory -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-DISABLED-MSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fno-sanitize=memory -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-DISABLED-MSAN // CHECK-TRACK-ORIGINS-DISABLED-MSAN-NOT: warning: argument unused -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-EXTRA-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-EXTRA-TRACK-ORIGINS // CHECK-NO-EXTRA-TRACK-ORIGINS-NOT: "-fsanitize-memory-track-origins" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize=alignment -fsanitize=vptr -fno-sanitize=vptr %s -### 2>&1 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize=alignment -fsanitize=vptr -fno-sanitize=vptr %s -### 2>&1 // OK -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -pie %s -### 2>&1 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -pie %s -### 2>&1 // OK -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=1 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=1 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-track-origins -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -fsanitize-memory-track-origins=1 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=1 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=1 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-track-origins -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -fsanitize-memory-track-origins=1 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 // CHECK-TRACK-ORIGINS-1: -fsanitize-memory-track-origins=1 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS // CHECK-NO-TRACK-ORIGINS-NOT: sanitize-memory-track-origins -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 // CHECK-TRACK-ORIGINS-2: -fsanitize-memory-track-origins=2 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=3 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-3 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=3 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-3 // CHECK-TRACK-ORIGINS-3: error: invalid value '3' in '-fsanitize-memory-track-origins=3' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-use-after-dtor -fsanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-use-after-dtor -fsanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR // CHECK-USE-AFTER-DTOR: -cc1{{.*}}-fsanitize-memory-use-after-dtor -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR-OFF -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-use-after-dtor -fno-sanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-use-after-dtor -fno-sanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR-OFF // CHECK-USE-AFTER-DTOR-OFF-NOT: -cc1{{.*}}memory-use-after-dtor -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=0 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-0 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=0 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-0 // CHECK-ASAN-FIELD-PADDING-0-NOT: -fsanitize-address-field-padding -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=1 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-1 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=1 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-1 // CHECK-ASAN-FIELD-PADDING-1: -fsanitize-address-field-padding=1 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=2 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-2 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=2 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-2 // CHECK-ASAN-FIELD-PADDING-2: -fsanitize-address-field-padding=2 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=3 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-3 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=3 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-3 // CHECK-ASAN-FIELD-PADDING-3: error: invalid value '3' in '-fsanitize-address-field-padding=3' -// RUN: %clang -target x86_64-linux-gnu -fsanitize-address-field-padding=2 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-NO-ASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-address-field-padding=2 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-NO-ASAN // CHECK-ASAN-FIELD-PADDING-NO-ASAN: warning: argument unused during compilation: '-fsanitize-address-field-padding=2' -// RUN: %clang -target x86_64-linux-gnu -fsanitize-address-field-padding=2 -fsanitize=address -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-DISABLED-ASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-address-field-padding=2 -fsanitize=address -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-DISABLED-ASAN // CHECK-ASAN-FIELD-PADDING-DISABLED-ASAN-NOT: warning: argument unused -// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1 // OK -// RUN: %clang -target arm-linux-androideabi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-NO-ASAN +// RUN: %clang --target=arm-linux-androideabi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-NO-ASAN // CHECK-ANDROID-NO-ASAN: "-mrelocation-model" "pic" -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=all -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover -fsanitize-recover=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-UBSAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover=all -fsanitize-recover=thread -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-UBSAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=all -fno-sanitize-recover=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-UBSAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=all -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover -fsanitize-recover=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-UBSAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-UBSAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover=all -fsanitize-recover=thread -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-UBSAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=all -fno-sanitize-recover=undefined -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-UBSAN // CHECK-RECOVER-UBSAN: "-fsanitize-recover={{((signed-integer-overflow|integer-divide-by-zero|function|shift-base|shift-exponent|vla-bound|alignment|null|vptr|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){17}"}} // CHECK-NO-RECOVER-UBSAN-NOT: sanitize-recover -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover=all -fsanitize-recover=object-size,shift-base -### 2>&1 | FileCheck %s --check-prefix=CHECK-PARTIAL-RECOVER +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fno-sanitize-recover=all -fsanitize-recover=object-size,shift-base -### 2>&1 | FileCheck %s --check-prefix=CHECK-PARTIAL-RECOVER // CHECK-PARTIAL-RECOVER: "-fsanitize-recover={{((shift-base),?){1}"}} -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=address -fsanitize-recover=all -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-ASAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=address -fsanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-ASAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=address -fsanitize-recover=all -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-ASAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=address -fsanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-ASAN // CHECK-RECOVER-ASAN: "-fsanitize-recover=address" -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=foobar,object-size,unreachable -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG-RECOVER +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=foobar,object-size,unreachable -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG-RECOVER // CHECK-DIAG-RECOVER: unsupported argument 'foobar' to option '-fsanitize-recover=' // CHECK-DIAG-RECOVER: unsupported argument 'unreachable' to option '-fsanitize-recover=' -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover -fno-sanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-DEPRECATED-RECOVER +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover -fno-sanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-DEPRECATED-RECOVER // CHECK-DEPRECATED-RECOVER-NOT: is deprecated -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=kernel-address -fno-sanitize-recover=kernel-address -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KASAN -// RUN: %clang -target x86_64-linux-gnu %s -fsanitize=kernel-hwaddress -fno-sanitize-recover=kernel-hwaddress -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KHWASAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=kernel-address -fno-sanitize-recover=kernel-address -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KASAN +// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=kernel-hwaddress -fno-sanitize-recover=kernel-hwaddress -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KHWASAN // CHECK-NO-RECOVER-KASAN: unsupported argument 'kernel-address' to option '-fno-sanitize-recover=' // CHECK-NO-RECOVER-KHWASAN: unsupported argument 'kernel-hwaddress' to option '-fno-sanitize-recover=' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL // CHECK-SANL: "-fsanitize=leak" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA // CHECK-SANA-SANL-NO-SANA: "-fsanitize=leak" -// RUN: %clang -target i686-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-X86 +// RUN: %clang --target=i686-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-X86 // CHECK-SANL-X86: "-fsanitize=leak" -// RUN: %clang -target i686-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-X86 +// RUN: %clang --target=i686-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-X86 // CHECK-SANA-SANL-NO-SANA-X86: "-fsanitize=leak" -// RUN: %clang -target arm-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-ARM +// RUN: %clang --target=arm-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-ARM // CHECK-SANL-ARM: "-fsanitize=leak" -// RUN: %clang -target arm-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-ARM +// RUN: %clang --target=arm-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-ARM // CHECK-SANA-SANL-NO-SANA-ARM: "-fsanitize=leak" -// RUN: %clang -target thumb-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-THUMB +// RUN: %clang --target=thumb-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-THUMB // CHECK-SANL-THUMB: "-fsanitize=leak" -// RUN: %clang -target thumb-linux -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-THUMB +// RUN: %clang --target=thumb-linux -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-THUMB // CHECK-SANA-SANL-NO-SANA-THUMB: "-fsanitize=leak" -// RUN: %clang -target armeb-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-ARMEB +// RUN: %clang --target=armeb-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-ARMEB // CHECK-SANL-ARMEB: "-fsanitize=leak" -// RUN: %clang -target armeb-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-ARMEB +// RUN: %clang --target=armeb-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-ARMEB // CHECK-SANA-SANL-NO-SANA-ARMEB: "-fsanitize=leak" -// RUN: %clang -target thumbeb-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-THUMBEB +// RUN: %clang --target=thumbeb-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-THUMBEB // CHECK-SANL-THUMBEB: "-fsanitize=leak" -// RUN: %clang -target thumbeb-linux -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-THUMBEB +// RUN: %clang --target=thumbeb-linux -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-THUMBEB // CHECK-SANA-SANL-NO-SANA-THUMBEB: "-fsanitize=leak" -// RUN: %clang -target mips-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS +// RUN: %clang --target=mips-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS // CHECK-SANL-MIPS: unsupported option '-fsanitize=leak' for target 'mips-unknown-linux' -// RUN: %clang -target mips-unknown-freebsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS-FREEBSD +// RUN: %clang --target=mips-unknown-freebsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS-FREEBSD // CHECK-SANL-MIPS-FREEBSD: unsupported option '-fsanitize=leak' for target 'mips-unknown-freebsd' -// RUN: %clang -target mips64-unknown-freebsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS64-FREEBSD +// RUN: %clang --target=mips64-unknown-freebsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS64-FREEBSD // CHECK-SANL-MIPS64-FREEBSD: "-fsanitize=leak" -// RUN: %clang -target powerpc64-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64 -// RUN: %clang -target powerpc64le-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64 +// RUN: %clang --target=powerpc64-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64 +// RUN: %clang --target=powerpc64le-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64 // CHECK-SANL-PPC64: "-fsanitize=leak" -// RUN: %clang -target powerpc-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC +// RUN: %clang --target=powerpc-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC // CHECK-SANL-PPC: unsupported option '-fsanitize=leak' for target 'powerpc-unknown-linux' -// RUN: %clang -target riscv64-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-RISCV64 +// RUN: %clang --target=riscv64-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-RISCV64 // CHECK-SANL-RISCV64: "-fsanitize=leak" -// RUN: %clang -target riscv64-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-RISCV64 +// RUN: %clang --target=riscv64-linux-gnu -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-RISCV64 // CHECK-SANA-SANL-NO-SANA-RISCV64: "-fsanitize=leak" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN // CHECK-MSAN: "-fno-assume-sane-operator-new" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN // CHECK-ASAN: "-fno-assume-sane-operator-new" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=zzz %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG1 +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=zzz %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG1 // CHECK-DIAG1: unsupported argument 'zzz' to option '-fsanitize=' // CHECK-DIAG1-NOT: unsupported argument 'zzz' to option '-fsanitize=' -// RUN: %clang -target x86_64-apple-darwin10 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-DARWIN +// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-DARWIN // CHECK-MSAN-DARWIN: unsupported option '-fsanitize=memory' for target 'x86_64-apple-darwin10' -// RUN: %clang -target x86_64-apple-darwin10 -fsanitize=memory -fno-sanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-NOMSAN-DARWIN +// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=memory -fno-sanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-NOMSAN-DARWIN // CHECK-MSAN-NOMSAN-DARWIN-NOT: unsupported option -// RUN: %clang -target x86_64-apple-darwin10 -fsanitize=memory -fsanitize=thread,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-TSAN-MSAN-DARWIN +// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=memory -fsanitize=thread,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-TSAN-MSAN-DARWIN // CHECK-MSAN-TSAN-MSAN-DARWIN: unsupported option '-fsanitize=memory' for target 'x86_64-apple-darwin10' // CHECK-MSAN-TSAN-MSAN-DARWIN-NOT: unsupported option -// RUN: %clang -target x86_64-apple-darwin10 -fsanitize=thread,memory -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MSAN-MSAN-DARWIN +// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=thread,memory -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MSAN-MSAN-DARWIN // CHECK-TSAN-MSAN-MSAN-DARWIN: unsupported option '-fsanitize=memory' for target 'x86_64-apple-darwin10' // CHECK-TSAN-MSAN-MSAN-DARWIN-NOT: unsupported option -// RUN: %clang -target x86_64-apple-darwin -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-DARWIN +// RUN: %clang --target=x86_64-apple-darwin -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-DARWIN // CHECK-TSAN-X86-64-DARWIN-NOT: unsupported option -// RUN: %clang -target x86_64-apple-macos -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-MACOS +// RUN: %clang --target=x86_64-apple-macos -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-MACOS // CHECK-TSAN-X86-64-MACOS-NOT: unsupported option -// RUN: %clang -target arm64-apple-macos -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ARM64-MACOS +// RUN: %clang --target=arm64-apple-macos -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ARM64-MACOS // CHECK-TSAN-ARM64-MACOS-NOT: unsupported option -// RUN: %clang -target x86_64-apple-ios-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-IOSSIMULATOR +// RUN: %clang --target=x86_64-apple-ios-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-IOSSIMULATOR // CHECK-TSAN-X86-64-IOSSIMULATOR-NOT: unsupported option -// RUN: %clang -target x86_64-apple-tvos-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-TVOSSIMULATOR +// RUN: %clang --target=x86_64-apple-tvos-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-TVOSSIMULATOR // CHECK-TSAN-X86-64-TVOSSIMULATOR-NOT: unsupported option -// RUN: %clang -target i386-apple-darwin -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-DARWIN +// RUN: %clang --target=i386-apple-darwin -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-DARWIN // CHECK-TSAN-I386-DARWIN: unsupported option '-fsanitize=thread' for target 'i386-apple-darwin' -// RUN: %clang -target arm-apple-ios -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ARM-IOS +// RUN: %clang --target=arm-apple-ios -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ARM-IOS // CHECK-TSAN-ARM-IOS: unsupported option '-fsanitize=thread' for target 'arm-apple-ios' -// RUN: %clang -target i386-apple-ios-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-IOSSIMULATOR +// RUN: %clang --target=i386-apple-ios-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-IOSSIMULATOR // CHECK-TSAN-I386-IOSSIMULATOR: unsupported option '-fsanitize=thread' for target 'i386-apple-ios-simulator' -// RUN: %clang -target i386-apple-tvos-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-TVOSSIMULATOR +// RUN: %clang --target=i386-apple-tvos-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-TVOSSIMULATOR // CHECK-TSAN-I386-TVOSSIMULATOR: unsupported option '-fsanitize=thread' for target 'i386-apple-tvos-simulator' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS // CHECK-TSAN-MEMORY-ACCESS-NOT: -cc1{{.*}}tsan-instrument-memory-accesses=0 // CHECK-TSAN-MEMORY-ACCESS-NOT: -cc1{{.*}}tsan-instrument-memintrinsics=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS-OFF // CHECK-TSAN-MEMORY-ACCESS-OFF: -cc1{{.*}}tsan-instrument-memory-accesses=0{{.*}}tsan-instrument-memintrinsics=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-memory-access -fsanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS-BOTH +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-memory-access -fsanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS-BOTH // CHECK-TSAN-MEMORY-ACCESS-BOTH-NOT: -cc1{{.*}}tsan-instrument-memory-accesses=0 // CHECK-TSAN-MEMORY-ACCESS-BOTH-NOT: -cc1{{.*}}tsan-instrument-memintrinsics=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-memory-access -fno-sanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS-BOTH-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-memory-access -fno-sanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS-BOTH-OFF // CHECK-TSAN-MEMORY-ACCESS-BOTH-OFF: -cc1{{.*}}tsan-instrument-memory-accesses=0{{.*}}tsan-instrument-memintrinsics=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT // CHECK-TSAN-FUNC-ENTRY-EXIT-NOT: -cc1{{.*}}tsan-instrument-func-entry-exit=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT-OFF // CHECK-TSAN-FUNC-ENTRY-EXIT-OFF: -cc1{{.*}}tsan-instrument-func-entry-exit=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-func-entry-exit -fsanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT-BOTH +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-func-entry-exit -fsanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT-BOTH // CHECK-TSAN-FUNC-ENTRY-EXIT-BOTH-NOT: -cc1{{.*}}tsan-instrument-func-entry-exit=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-func-entry-exit -fno-sanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT-BOTH-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-func-entry-exit -fno-sanitize-thread-func-entry-exit %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-FUNC-ENTRY-EXIT-BOTH-OFF // CHECK-TSAN-FUNC-ENTRY-EXIT-BOTH-OFF: -cc1{{.*}}tsan-instrument-func-entry-exit=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS // CHECK-TSAN-ATOMICS-NOT: -cc1{{.*}}tsan-instrument-atomics=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS-OFF // CHECK-TSAN-ATOMICS-OFF: -cc1{{.*}}tsan-instrument-atomics=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-atomics -fsanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS-BOTH +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fno-sanitize-thread-atomics -fsanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS-BOTH // CHECK-TSAN-ATOMICS-BOTH-NOT: -cc1{{.*}}tsan-instrument-atomics=0 -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-atomics -fno-sanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS-BOTH-OFF +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-atomics -fno-sanitize-thread-atomics %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ATOMICS-BOTH-OFF // CHECK-TSAN-ATOMICS-BOTH-OFF: -cc1{{.*}}tsan-instrument-atomics=0 -// RUN: %clang -target x86_64-apple-darwin10 -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-DARWIN -// RUN: %clang -target i386-apple-darwin10 -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-DARWIN +// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-DARWIN +// RUN: %clang --target=i386-apple-darwin10 -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-DARWIN // CHECK-FSAN-DARWIN: -cc1{{.*}}"-fsanitize=function" "-fsanitize-recover=function" -// RUN: %clang -target x86_64-apple-darwin10 -mmacosx-version-min=10.8 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-OLD +// RUN: %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.8 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-OLD // CHECK-VPTR-DARWIN-OLD: unsupported option '-fsanitize=vptr' for target 'x86_64-apple-darwin10' -// RUN: %clang -target arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-IOS-OLD +// RUN: %clang --target=arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-IOS-OLD // CHECK-VPTR-IOS-OLD: unsupported option '-fsanitize=vptr' for target 'arm-apple-ios4' -// RUN: %clang -target aarch64-apple-darwin15.0.0 -fsanitize=vptr %s -### 2>&1 +// RUN: %clang --target=aarch64-apple-darwin15.0.0 -fsanitize=vptr %s -### 2>&1 // OK -// RUN: %clang -target x86_64-apple-darwin15.0.0-simulator -fsanitize=vptr %s -### 2>&1 +// RUN: %clang --target=x86_64-apple-darwin15.0.0-simulator -fsanitize=vptr %s -### 2>&1 // OK -// RUN: %clang -target x86_64-apple-darwin10 -mmacosx-version-min=10.9 -fsanitize=alignment,vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-NEW +// RUN: %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.9 -fsanitize=alignment,vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-NEW // CHECK-VPTR-DARWIN-NEW: -fsanitize=alignment,vptr -// RUN: %clang -target armv7-apple-ios7 -miphoneos-version-min=7.0 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-IOS +// RUN: %clang --target=armv7-apple-ios7 -miphoneos-version-min=7.0 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-IOS // CHECK-ASAN-IOS: -fsanitize=address -// RUN %clang -target i386-pc-openbsd -fsanitize=undefined %s -### 2>&1 | FileCheck --check-prefix=CHECK-UBSAN-OPENBSD +// RUN %clang --target=i386-pc-openbsd -fsanitize=undefined %s -### 2>&1 | FileCheck --check-prefix=CHECK-UBSAN-OPENBSD // CHECK-UBSAN-OPENBSD: -fsanitize=undefined -// RUN: %clang -target i386-pc-openbsd -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-OPENBSD +// RUN: %clang --target=i386-pc-openbsd -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-OPENBSD // CHECK-ASAN-OPENBSD: unsupported option '-fsanitize=address' for target 'i386-pc-openbsd' -// RUN: %clang -target i386-pc-openbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-OPENBSD +// RUN: %clang --target=i386-pc-openbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-OPENBSD // CHECK-LSAN-OPENBSD: unsupported option '-fsanitize=leak' for target 'i386-pc-openbsd' -// RUN: %clang -target i386-pc-openbsd -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-OPENBSD +// RUN: %clang --target=i386-pc-openbsd -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-OPENBSD // CHECK-TSAN-OPENBSD: unsupported option '-fsanitize=thread' for target 'i386-pc-openbsd' -// RUN: %clang -target i386-pc-openbsd -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-OPENBSD +// RUN: %clang --target=i386-pc-openbsd -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-OPENBSD // CHECK-MSAN-OPENBSD: unsupported option '-fsanitize=memory' for target 'i386-pc-openbsd' -// RUN: %clang -target x86_64-apple-darwin -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-X86-64-DARWIN +// RUN: %clang --target=x86_64-apple-darwin -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-X86-64-DARWIN // CHECK-LSAN-X86-64-DARWIN-NOT: unsupported option -// RUN: %clang -target x86_64-apple-ios-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-X86-64-IOSSIMULATOR +// RUN: %clang --target=x86_64-apple-ios-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-X86-64-IOSSIMULATOR // CHECK-LSAN-X86-64-IOSSIMULATOR-NOT: unsupported option -// RUN: %clang -target x86_64-apple-tvos-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-X86-64-TVOSSIMULATOR +// RUN: %clang --target=x86_64-apple-tvos-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-X86-64-TVOSSIMULATOR // CHECK-LSAN-X86-64-TVOSSIMULATOR-NOT: unsupported option -// RUN: %clang -target i386-apple-darwin -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-I386-DARWIN +// RUN: %clang --target=i386-apple-darwin -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-I386-DARWIN // CHECK-LSAN-I386-DARWIN-NOT: unsupported option -// RUN: %clang -target arm-apple-ios -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-ARM-IOS +// RUN: %clang --target=arm-apple-ios -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-ARM-IOS // CHECK-LSAN-ARM-IOS-NOT: unsupported option -// RUN: %clang -target i386-apple-ios-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-I386-IOSSIMULATOR +// RUN: %clang --target=i386-apple-ios-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-I386-IOSSIMULATOR // CHECK-LSAN-I386-IOSSIMULATOR-NOT: unsupported option -// RUN: %clang -target i386-apple-tvos-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-I386-TVOSSIMULATOR +// RUN: %clang --target=i386-apple-tvos-simulator -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-I386-TVOSSIMULATOR // CHECK-LSAN-I386-TVOSSIMULATOR-NOT: unsupported option -// RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target x86_64-apple-darwin10 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target x86_64-pc-win32 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOMFCALL -// RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOMFCALL -// RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-derived-cast -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-DCAST -// RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-unrelated-cast -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-UCAST -// RUN: %clang -target x86_64-linux-gnu -flto -fvisibility=hidden -fsanitize=cfi-nvcall -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NVCALL -// RUN: %clang -target x86_64-linux-gnu -flto -fvisibility=hidden -fsanitize=cfi-vcall -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-VCALL -// RUN: %clang -target arm-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target aarch64-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target arm-linux-android -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target aarch64-linux-android -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target aarch64_be -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target riscv32 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI -// RUN: %clang -target riscv64 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=x86_64-apple-darwin10 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=x86_64-pc-win32 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOMFCALL +// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOMFCALL +// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-derived-cast -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-DCAST +// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-unrelated-cast -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-UCAST +// RUN: %clang --target=x86_64-linux-gnu -flto -fvisibility=hidden -fsanitize=cfi-nvcall -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NVCALL +// RUN: %clang --target=x86_64-linux-gnu -flto -fvisibility=hidden -fsanitize=cfi-vcall -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-VCALL +// RUN: %clang --target=arm-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=aarch64-linux-gnu -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=arm-linux-android -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=aarch64-linux-android -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=aarch64_be -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=riscv32 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI +// RUN: %clang --target=riscv64 -fvisibility=hidden -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI // CHECK-CFI: -emit-llvm-bc{{.*}}-fsanitize=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall // CHECK-CFI-NOMFCALL: -emit-llvm-bc{{.*}}-fsanitize=cfi-derived-cast,cfi-icall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall // CHECK-CFI-DCAST: -emit-llvm-bc{{.*}}-fsanitize=cfi-derived-cast @@ -593,72 +593,72 @@ // CHECK-CFI-NVCALL: -emit-llvm-bc{{.*}}-fsanitize=cfi-nvcall // CHECK-CFI-VCALL: -emit-llvm-bc{{.*}}-fsanitize=cfi-vcall -// RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden -flto -fsanitize=cfi-derived-cast -fno-lto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOLTO +// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -flto -fsanitize=cfi-derived-cast -fno-lto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOLTO // CHECK-CFI-NOLTO: '-fsanitize=cfi-derived-cast' only allowed with '-flto' -// RUN: %clang -target x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS +// RUN: %clang --target=x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS // CHECK-CFI-NOVIS: '-fsanitize=cfi-derived-cast' only allowed with '-fvisibility=' -// RUN: %clang -target x86_64-pc-win32 -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR +// RUN: %clang --target=x86_64-pc-win32 -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR // RUN: echo > %t.o -// RUN: %clang -target x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast %t.o -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR +// RUN: %clang --target=x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast %t.o -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR // CHECK-CFI-NOVIS-NOERROR-NOT: only allowed with -// RUN: %clang -target mips-unknown-linux -fsanitize=cfi-icall %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-ICALL-MIPS +// RUN: %clang --target=mips-unknown-linux -fsanitize=cfi-icall %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-ICALL-MIPS // CHECK-CFI-ICALL-MIPS: unsupported option '-fsanitize=cfi-icall' for target 'mips-unknown-linux' -// RUN: %clang -target x86_64-linux-gnu -fsanitize-trap=address -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-trap=address -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-TRAP // CHECK-ASAN-TRAP: error: unsupported argument 'address' to option '-fsanitize-trap=' -// RUN: %clang -target x86_64-linux-gnu -fsanitize-trap=hwaddress -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize-trap=hwaddress -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-TRAP // CHECK-HWASAN-TRAP: error: unsupported argument 'hwaddress' to option '-fsanitize-trap=' -// RUN: %clang -target x86_64-apple-darwin10 -mmacosx-version-min=10.7 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-OLD-MACOS +// RUN: %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.7 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-OLD-MACOS // CHECK-CFI-NOTRAP-OLD-MACOS: error: unsupported option '-fno-sanitize-trap=cfi-vcall' for target 'x86_64-apple-darwin10' -// RUN: %clang -target x86_64-pc-win32 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-WIN +// RUN: %clang --target=x86_64-pc-win32 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-WIN // CHECK-CFI-NOTRAP-WIN: -emit-llvm-bc // CHECK-CFI-NOTRAP-WIN-NOT: -fsanitize-trap=cfi -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CROSS-DSO -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NO-CROSS-DSO -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -fsanitize-cfi-cross-dso -fno-sanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NO-CROSS-DSO -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-cfi-cross-dso -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CROSS-DSO +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CROSS-DSO +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NO-CROSS-DSO +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fsanitize-cfi-cross-dso -fno-sanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NO-CROSS-DSO +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-cfi-cross-dso -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CROSS-DSO // CHECK-CFI-CROSS-DSO: -emit-llvm-bc // CHECK-CFI-CROSS-DSO: -fsanitize-cfi-cross-dso // CHECK-CFI-NO-CROSS-DSO: -emit-llvm-bc // CHECK-CFI-NO-CROSS-DSO-NOT: -fsanitize-cfi-cross-dso -// RUN: %clang -target x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-mfcall -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-MFCALL-CROSS-DSO +// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-mfcall -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-MFCALL-CROSS-DSO // CHECK-CFI-MFCALL-CROSS-DSO: '-fsanitize=cfi-mfcall' not allowed with '-fsanitize-cfi-cross-dso' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-icall-generalize-pointers -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-GENERALIZE-POINTERS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi-icall -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-CFI-GENERALIZE-POINTERS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-icall-generalize-pointers -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-GENERALIZE-POINTERS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-CFI-GENERALIZE-POINTERS // CHECK-CFI-GENERALIZE-POINTERS: -fsanitize-cfi-icall-generalize-pointers // CHECK-NO-CFI-GENERALIZE-POINTERS-NOT: -fsanitize-cfi-icall-generalize-pointers -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-icall-generalize-pointers -fsanitize-cfi-cross-dso -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-GENERALIZE-AND-CROSS-DSO +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-icall-generalize-pointers -fsanitize-cfi-cross-dso -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-GENERALIZE-AND-CROSS-DSO // CHECK-CFI-GENERALIZE-AND-CROSS-DSO: error: invalid argument '-fsanitize-cfi-cross-dso' not allowed with '-fsanitize-cfi-icall-generalize-pointers' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-canonical-jump-tables -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CANONICAL-JUMP-TABLES -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi-icall -fno-sanitize-cfi-canonical-jump-tables -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-CFI-CANONICAL-JUMP-TABLES -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi-icall -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CANONICAL-JUMP-TABLES +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-canonical-jump-tables -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CANONICAL-JUMP-TABLES +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fno-sanitize-cfi-canonical-jump-tables -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-CFI-CANONICAL-JUMP-TABLES +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CANONICAL-JUMP-TABLES // CHECK-CFI-CANONICAL-JUMP-TABLES: -fsanitize-cfi-canonical-jump-tables // CHECK-NO-CFI-CANONICAL-JUMP-TABLES-NOT: -fsanitize-cfi-canonical-jump-tables -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -fsanitize-stats -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-STATS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fsanitize-stats -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-STATS // CHECK-CFI-STATS: -fsanitize-stats -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kcfi -fsanitize=cfi -flto -fvisibility=hidden %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOCFI +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fsanitize=cfi -flto -fvisibility=hidden %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOCFI // CHECK-KCFI-NOCFI: error: invalid argument '-fsanitize=kcfi' not allowed with '-fsanitize=cfi' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kcfi -fsanitize-trap=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOTRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fsanitize-trap=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOTRAP // CHECK-KCFI-NOTRAP: error: unsupported argument 'kcfi' to option '-fsanitize-trap=' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI // CHECK-KCFI: "-fsanitize=kcfi" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=kcfi -fno-sanitize-recover=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-RECOVER +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fno-sanitize-recover=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-RECOVER // CHECK-KCFI-RECOVER: error: unsupported argument 'kcfi' to option '-fno-sanitize-recover=' // RUN: %clang_cl -fsanitize=address -c -MDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL @@ -682,13 +682,13 @@ // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP // NOSP-NOT: "-fsanitize=safe-stack" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN -// RUN: %clang -target x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP -// RUN: %clang -target x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP -// RUN: %clang -target arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP -// RUN: %clang -target aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP -// RUN: %clang -target i386-contiki-unknown -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN +// RUN: %clang --target=x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP +// RUN: %clang --target=arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP +// RUN: %clang --target=aarch64-linux-android -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP +// RUN: %clang --target=i386-contiki-unknown -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP // NO-SP-NOT: stack-protector // NO-SP: "-fsanitize=safe-stack" // SP-ASAN: error: invalid argument '-fsanitize=safe-stack' not allowed with '-fsanitize=address' @@ -696,245 +696,245 @@ // SP: -stack-protector // NO-SP-NOT: stack-protector -// RUN: %clang -target powerpc64-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM -// RUN: %clang -target powerpc64le-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM +// RUN: %clang --target=powerpc64-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM +// RUN: %clang --target=powerpc64le-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM // CHECK-SANM: "-fsanitize=memory" -// RUN: %clang -target aarch64-unknown-cloudabi -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-CLOUDABI -// RUN: %clang -target x86_64-unknown-cloudabi -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-CLOUDABI +// RUN: %clang --target=aarch64-unknown-cloudabi -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-CLOUDABI +// RUN: %clang --target=x86_64-unknown-cloudabi -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-CLOUDABI // SAFESTACK-CLOUDABI: "-fsanitize=safe-stack" -// RUN: %clang -target x86_64--freebsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-FREEBSD -// RUN: %clang -target aarch64--freebsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-FREEBSD +// RUN: %clang --target=x86_64--freebsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-FREEBSD +// RUN: %clang --target=aarch64--freebsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-FREEBSD // KERNEL-ADDRESS-FREEBSD: "-fsanitize=kernel-address" -// RUN: %clang -target x86_64--freebsd -fsanitize=kernel-memory %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-MEMORY-FREEBSD -// RUN: %clang -target aarch64--freebsd -fsanitize=kernel-memory %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-MEMORY-FREEBSD +// RUN: %clang --target=x86_64--freebsd -fsanitize=kernel-memory %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-MEMORY-FREEBSD +// RUN: %clang --target=aarch64--freebsd -fsanitize=kernel-memory %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-MEMORY-FREEBSD // KERNEL-MEMORY-FREEBSD: "-fsanitize=kernel-memory" // * NetBSD; please keep ordered as in Sanitizers.def * -// RUN: %clang -target i386--netbsd -fsanitize=address %s -### 2>&1 | FileCheck %s -check-prefix=ADDRESS-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=address %s -### 2>&1 | FileCheck %s -check-prefix=ADDRESS-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=address %s -### 2>&1 | FileCheck %s -check-prefix=ADDRESS-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=address %s -### 2>&1 | FileCheck %s -check-prefix=ADDRESS-NETBSD // ADDRESS-NETBSD: "-fsanitize=address" -// RUN: %clang -target x86_64--netbsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-NETBSD // KERNEL-ADDRESS-NETBSD: "-fsanitize=kernel-address" -// RUN: %clang -target x86_64--netbsd -fsanitize=hwaddress %s -### 2>&1 | FileCheck %s -check-prefix=HWADDRESS-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=hwaddress %s -### 2>&1 | FileCheck %s -check-prefix=HWADDRESS-NETBSD // HWADDRESS-NETBSD: "-fsanitize=hwaddress" -// RUN: %clang -target x86_64--netbsd -fsanitize=kernel-hwaddress %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-HWADDRESS-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=kernel-hwaddress %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-HWADDRESS-NETBSD // KERNEL-HWADDRESS-NETBSD: "-fsanitize=kernel-hwaddress" -// RUN: %clang -target x86_64--netbsd -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=MEMORY-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=MEMORY-NETBSD // MEMORY-NETBSD: "-fsanitize=memory" -// RUN: %clang -target x86_64--netbsd -fsanitize=kernel-memory %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-MEMORY-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=kernel-memory %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-MEMORY-NETBSD // KERNEL-MEMORY-NETBSD: "-fsanitize=kernel-memory" -// RUN: %clang -target x86_64--netbsd -fsanitize=thread %s -### 2>&1 | FileCheck %s -check-prefix=THREAD-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=thread %s -### 2>&1 | FileCheck %s -check-prefix=THREAD-NETBSD // THREAD-NETBSD: "-fsanitize=thread" -// RUN: %clang -target i386--netbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s -check-prefix=LEAK-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s -check-prefix=LEAK-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s -check-prefix=LEAK-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s -check-prefix=LEAK-NETBSD // LEAK-NETBSD: "-fsanitize=leak" -// RUN: %clang -target i386--netbsd -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-NETBSD // FUNCTION-NETBSD: "-fsanitize=function" -// RUN: %clang -target i386--netbsd -fsanitize=vptr %s -### 2>&1 | FileCheck %s -check-prefix=VPTR-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=vptr %s -### 2>&1 | FileCheck %s -check-prefix=VPTR-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=vptr %s -### 2>&1 | FileCheck %s -check-prefix=VPTR-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=vptr %s -### 2>&1 | FileCheck %s -check-prefix=VPTR-NETBSD // VPTR-NETBSD: "-fsanitize=vptr" -// RUN: %clang -target x86_64--netbsd -fsanitize=dataflow %s -### 2>&1 | FileCheck %s -check-prefix=DATAFLOW-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=dataflow %s -### 2>&1 | FileCheck %s -check-prefix=DATAFLOW-NETBSD // DATAFLOW-NETBSD: "-fsanitize=dataflow" -// RUN: %clang -target i386--netbsd -fsanitize=cfi %s -### 2>&1 | FileCheck %s -check-prefix=CFI-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=cfi %s -### 2>&1 | FileCheck %s -check-prefix=CFI-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=cfi %s -### 2>&1 | FileCheck %s -check-prefix=CFI-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=cfi %s -### 2>&1 | FileCheck %s -check-prefix=CFI-NETBSD // CFI-NETBSD: "-fsanitize=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall" -// RUN: %clang -target i386--netbsd -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-NETBSD // SAFESTACK-NETBSD: "-fsanitize=safe-stack" -// RUN: %clang -target x86_64--netbsd -fsanitize=shadow-call-stack %s -### 2>&1 | FileCheck %s -check-prefix=SHADOW-CALL-STACK-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=shadow-call-stack %s -### 2>&1 | FileCheck %s -check-prefix=SHADOW-CALL-STACK-NETBSD // SHADOW-CALL-STACK-NETBSD: "-fsanitize=shadow-call-stack" -// RUN: %clang -target i386--netbsd -fsanitize=undefined %s -### 2>&1 | FileCheck %s -check-prefix=UNDEFINED-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=undefined %s -### 2>&1 | FileCheck %s -check-prefix=UNDEFINED-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=undefined %s -### 2>&1 | FileCheck %s -check-prefix=UNDEFINED-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=undefined %s -### 2>&1 | FileCheck %s -check-prefix=UNDEFINED-NETBSD // UNDEFINED-NETBSD: "-fsanitize={{.*}} -// RUN: %clang -target i386--netbsd -fsanitize=scudo %s -### 2>&1 | FileCheck %s -check-prefix=SCUDO-NETBSD -// RUN: %clang -target x86_64--netbsd -fsanitize=scudo %s -### 2>&1 | FileCheck %s -check-prefix=SCUDO-NETBSD +// RUN: %clang --target=i386--netbsd -fsanitize=scudo %s -### 2>&1 | FileCheck %s -check-prefix=SCUDO-NETBSD +// RUN: %clang --target=x86_64--netbsd -fsanitize=scudo %s -### 2>&1 | FileCheck %s -check-prefix=SCUDO-NETBSD // SCUDO-NETBSD: "-fsanitize=scudo" -// RUN: %clang -target i386--solaris -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-SOLARIS -// RUN: %clang -target x86_64--solaris -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-SOLARIS +// RUN: %clang --target=i386--solaris -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-SOLARIS +// RUN: %clang --target=x86_64--solaris -fsanitize=function %s -### 2>&1 | FileCheck %s -check-prefix=FUNCTION-SOLARIS // FUNCTION-SOLARIS: "-fsanitize=function" -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=function -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-UBSAN-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=function -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-UBSAN-PS4 // CHECK-FSAN-UBSAN-PS4: unsupported option '-fsanitize=function' for target 'x86_64-scei-ps4' -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSAN-PS4 // CHECK-FSAN-PS4: unsupported option '-fsanitize=function' for target 'x86_64-scei-ps4' -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=dataflow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DFSAN-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=dataflow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DFSAN-PS4 // CHECK-DFSAN-PS4: unsupported option '-fsanitize=dataflow' for target 'x86_64-scei-ps4' -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-PS4 // CHECK-LSAN-PS4: unsupported option '-fsanitize=leak' for target 'x86_64-scei-ps4' -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-PS4 // CHECK-MSAN-PS4: unsupported option '-fsanitize=memory' for target 'x86_64-scei-ps4' -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-PS4 // CHECK-TSAN-PS4: unsupported option '-fsanitize=thread' for target 'x86_64-scei-ps4' -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-PS4 // Make sure there are no *.{o,bc} or -l passed before the ASan library. // CHECK-ASAN-PS4-NOT: {{(\.(o|bc)"? |-l).*-lSceDbgAddressSanitizer_stub_weak}} // CHECK-ASAN-PS4: --dependent-lib=libSceDbgAddressSanitizer_stub_weak.a // CHECK-ASAN-PS4-NOT: {{(\.(o|bc)"? |-l).*-lSceDbgAddressSanitizer_stub_weak}} // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=address -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS4 -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=address -nodefaultlibs %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS4 -// RUN: %clang -target x86_64-scei-ps4 -fsanitize=address -nodefaultlibs -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=address -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=address -nodefaultlibs %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS4 +// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=address -nodefaultlibs -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS4 // CHECK-ASAN-NOLIB-PS4-NOT: SceDbgAddressSanitizer_stub_weak -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-PS5 // Make sure there are no *.{o,bc} or -l passed before the ASan library. // CHECK-ASAN-PS5-NOT: {{(\.(o|bc)"? |-l).*-lSceAddressSanitizer_nosubmission_stub_weak}} // CHECK-ASAN-PS5: --dependent-lib=libSceAddressSanitizer_nosubmission_stub_weak.a // CHECK-ASAN-PS5-NOT: {{(\.(o|bc)"? |-l).*-lSceAddressSanitizer_nosubmission_stub_weak}} // CHECK-ASAN-PS5: -lSceAddressSanitizer_nosubmission_stub_weak -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=address -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS5 -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=address -nodefaultlibs %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS5 -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=address -nodefaultlibs -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=address -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=address -nodefaultlibs %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=address -nodefaultlibs -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NOLIB-PS5 // CHECK-ASAN-NOLIB-PS5-NOT: SceAddressSanitizer_nosubmission_stub_weak -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-PS5 // Make sure there are no *.{o,bc} or -l passed before the TSan library. // CHECK-TSAN-PS5-NOT: {{(\.(o|bc)"? |-l).*-lSceThreadSanitizer_nosubmission_stub_weak}} // CHECK-TSAN-PS5: --dependent-lib=libSceThreadSanitizer_nosubmission_stub_weak.a // CHECK-TSAN-PS5-NOT: {{(\.(o|bc)"? |-l).*-lSceThreadSanitizer_nosubmission_stub_weak}} // CHECK-TSAN-PS5: -lSceThreadSanitizer_nosubmission_stub_weak -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=thread -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-NOLIB-PS5 -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=thread -nodefaultlibs %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-NOLIB-PS5 -// RUN: %clang -target x86_64-sie-ps5 -fsanitize=thread -nodefaultlibs -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-NOLIB-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=thread -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-NOLIB-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=thread -nodefaultlibs %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-NOLIB-PS5 +// RUN: %clang --target=x86_64-sie-ps5 -fsanitize=thread -nodefaultlibs -nostdlib %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-NOLIB-PS5 // CHECK-TSAN-NOLIB-PS5-NOT: SceThreadSanitizer_nosubmission_stub_weak -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-MINIMAL // CHECK-ASAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MINIMAL // CHECK-TSAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-MINIMAL // CHECK-UBSAN-MINIMAL: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|shift-base|shift-exponent|unreachable|return|vla-bound|alignment|null|pointer-overflow|float-cast-overflow|array-bounds|enum|bool|builtin|returns-nonnull-attribute|nonnull-attribute),?){17}"}} // CHECK-UBSAN-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=integer -fsanitize-trap=integer %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-INTSAN-TRAP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=integer -fsanitize-trap=integer %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-INTSAN-TRAP // CHECK-INTSAN-TRAP: "-fsanitize-trap=integer-divide-by-zero,shift-base,shift-exponent,signed-integer-overflow,unsigned-integer-overflow,unsigned-shift-base,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=integer -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-INTSAN-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=integer -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-INTSAN-MINIMAL // CHECK-INTSAN-MINIMAL: "-fsanitize=integer-divide-by-zero,shift-base,shift-exponent,signed-integer-overflow,unsigned-integer-overflow,unsigned-shift-base,implicit-unsigned-integer-truncation,implicit-signed-integer-truncation,implicit-integer-sign-change" // CHECK-INTSAN-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target aarch64-linux-android -march=armv8-a+memtag -fsanitize=memtag -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MEMTAG-MINIMAL +// RUN: %clang --target=aarch64-linux-android -march=armv8-a+memtag -fsanitize=memtag -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MEMTAG-MINIMAL // CHECK-MEMTAG-MINIMAL: "-fsanitize=memtag-stack,memtag-heap,memtag-globals" // CHECK-MEMTAG-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize=function -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-FUNCTION-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize=function -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-FUNCTION-MINIMAL // CHECK-UBSAN-FUNCTION-MINIMAL: error: invalid argument '-fsanitize=function' not allowed with '-fsanitize-minimal-runtime' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize=vptr -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-VPTR-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize=vptr -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-VPTR-MINIMAL // CHECK-UBSAN-VPTR-MINIMAL: error: invalid argument '-fsanitize=vptr' not allowed with '-fsanitize-minimal-runtime' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-UBSAN-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-UBSAN-MINIMAL // CHECK-ASAN-UBSAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-MINIMAL // CHECK-HWASAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=hwaddress' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-MINIMAL // CHECK-CFI-MINIMAL: "-fsanitize=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall" // CHECK-CFI-MINIMAL: "-fsanitize-trap=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall" // CHECK-CFI-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-MINIMAL // CHECK-CFI-NOTRAP-MINIMAL: error: invalid argument 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -fno-sanitize=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOICALL-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -fno-sanitize=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOICALL-MINIMAL // CHECK-CFI-NOICALL-MINIMAL: "-fsanitize=cfi-derived-cast,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall" // CHECK-CFI-NOICALL-MINIMAL: "-fsanitize-trap=cfi-derived-cast,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall" // CHECK-CFI-NOICALL-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=shadow-call-stack -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCS-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=shadow-call-stack -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCS-MINIMAL // CHECK-SCS-MINIMAL: "-fsanitize=shadow-call-stack" // CHECK-SCS-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target aarch64 -fsanitize=shadow-call-stack -ffixed-x18 %s -### 2>&1 | FileCheck %s --check-prefix=AARCH64-SCS -// RUN: %clang -target aarch64_be -fsanitize=shadow-call-stack -ffixed-x18 %s -### 2>&1 | FileCheck %s --check-prefix=AARCH64-SCS +// RUN: %clang --target=aarch64 -fsanitize=shadow-call-stack -ffixed-x18 %s -### 2>&1 | FileCheck %s --check-prefix=AARCH64-SCS +// RUN: %clang --target=aarch64_be -fsanitize=shadow-call-stack -ffixed-x18 %s -### 2>&1 | FileCheck %s --check-prefix=AARCH64-SCS // AARCH64-SCS: "-fsanitize=shadow-call-stack" -// RUN: %clang -target aarch64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target arm-linux-androideabi -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target i386-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target mips64-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target mips64el-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target mips-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target mipsel-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target powerpc64-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO -// RUN: %clang -target powerpc64le-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=aarch64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=arm-linux-androideabi -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=i386-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=mips64-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=mips64el-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=mips-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=mipsel-unknown-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=powerpc64-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO +// RUN: %clang --target=powerpc64le-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO // CHECK-SCUDO: "-fsanitize=scudo" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-PIE -// RUN: %clang -target arm-linux-androideabi -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-PIE +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-PIE +// RUN: %clang --target=arm-linux-androideabi -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-PIE // CHECK-SCUDO-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" // CHECK-SCUDO-PIE: "-pie" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo,undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-UBSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-UBSAN // CHECK-SCUDO-UBSAN: "-fsanitize={{.*}}scudo" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-MINIMAL // CHECK-SCUDO-MINIMAL: "-fsanitize=scudo" // CHECK-SCUDO-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined,scudo -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-UBSAN-MINIMAL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined,scudo -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-UBSAN-MINIMAL // CHECK-SCUDO-UBSAN-MINIMAL: "-fsanitize={{.*}}scudo" // CHECK-SCUDO-UBSAN-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang -target powerpc-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SCUDO +// RUN: %clang --target=powerpc-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SCUDO // CHECK-NO-SCUDO: unsupported option -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo,address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-ASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-ASAN // CHECK-SCUDO-ASAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=address' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo,leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-LSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-LSAN // CHECK-SCUDO-LSAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=leak' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-MSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-MSAN // CHECK-SCUDO-MSAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=memory' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo,thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-TSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-TSAN // CHECK-SCUDO-TSAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=thread' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo,hwaddress %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-HWASAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,hwaddress %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-HWASAN // CHECK-SCUDO-HWASAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=hwaddress' // -// RUN: %clang -target x86_64-linux-gnu -fsanitize=scudo,kernel-memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-KMSAN +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,kernel-memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-KMSAN // CHECK-SCUDO-KMSAN: error: invalid argument '-fsanitize=kernel-memory' not allowed with '-fsanitize=scudo' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-INTERCEPTOR-ABI -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=interceptor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-INTERCEPTOR-ABI -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=platform %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-PLATFORM-ABI -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=foo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-FOO-ABI +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-INTERCEPTOR-ABI +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=interceptor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-INTERCEPTOR-ABI +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=platform %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-PLATFORM-ABI +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=foo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-FOO-ABI // CHECK-HWASAN-INTERCEPTOR-ABI: "-default-function-attr" "hwasan-abi=interceptor" // CHECK-HWASAN-PLATFORM-ABI: "-default-function-attr" "hwasan-abi=platform" // CHECK-HWASAN-FOO-ABI: error: invalid value 'foo' in '-fsanitize-hwaddress-abi=foo' -// RUN: %clang -target x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-experimental-aliasing %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-ALIAS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-experimental-aliasing %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-ALIAS // CHECK-HWASAN-ALIAS: "-mllvm" "-hwasan-experimental-use-page-aliases=1" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,pointer-compare,pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-ALL -// RUN: %clang -target x86_64-linux-gnu -fsanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-CMP-NEEDS-ADDRESS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-SUB-NEEDS-ADDRESS -// RUN: %clang -target x86_64-linux-gnu -fsanitize=pointer-subtract -fno-sanitize=pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-SUB -// RUN: %clang -target x86_64-linux-gnu -fsanitize=pointer-compare -fno-sanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-CMP +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,pointer-compare,pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-ALL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-CMP-NEEDS-ADDRESS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-SUB-NEEDS-ADDRESS +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-subtract -fno-sanitize=pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-SUB +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-compare -fno-sanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-CMP // CHECK-POINTER-ALL: -cc1{{.*}}-fsanitize={{[^"]*}}pointer-compare,pointer-subtract{{.*}}" {{.*}} "-mllvm" "-asan-detect-invalid-pointer-cmp" {{.*}}"-mllvm" "-asan-detect-invalid-pointer-sub" // CHECK-POINTER-CMP-NEEDS-ADDRESS: error: invalid argument '-fsanitize=pointer-compare' only allowed with '-fsanitize=address' // CHECK-POINTER-SUB-NEEDS-ADDRESS: error: invalid argument '-fsanitize=pointer-subtract' only allowed with '-fsanitize=address' @@ -955,5 +955,5 @@ // RUN: %clang -fsanitize=undefined,float-divide-by-zero %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIVBYZERO-UBSAN // CHECK-DIVBYZERO-UBSAN: "-fsanitize={{.*}},float-divide-by-zero,{{.*}}" -// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined,function -mcmodel=large %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-FUNCTION-CODE-MODEL +// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined,function -mcmodel=large %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-FUNCTION-CODE-MODEL // CHECK-UBSAN-FUNCTION-CODE-MODEL: error: invalid argument '-fsanitize=function' only allowed with '-mcmodel=small' diff --git a/clang/test/Driver/hip-binding.hip b/clang/test/Driver/hip-binding.hip index e9ced30..0790fc8 100644 --- a/clang/test/Driver/hip-binding.hip +++ b/clang/test/Driver/hip-binding.hip @@ -1,10 +1,10 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: %clang -ccc-print-bindings --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: -c 2>&1 | FileCheck -check-prefix=NRDCS %s -// RUN: %clang -ccc-print-bindings -target x86_64-linux-gnu --offload-new-driver \ +// RUN: %clang -ccc-print-bindings --target=x86_64-linux-gnu --offload-new-driver \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: -c 2>&1 | FileCheck -check-prefix=NRDCS %s // NRDCS: # "amdgcn-amd-amdhsa" - "clang", inputs: ["[[IN:.*hip-binding.hip]]"], output: "[[OBJ1:.*o]]" @@ -14,7 +14,7 @@ // NRDCS: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[IMG1]]", "[[IMG2]]"], output: "[[FATBIN:.*]]" // NRDCS: # "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[IN]]", "[[FATBIN]]"], output: "{{.*}}" -// RUN: %clang -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: %clang -ccc-print-bindings --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: -c -fgpu-rdc 2>&1 | FileCheck -check-prefix=RDCS %s // RDCS: # "amdgcn-amd-amdhsa" - "clang", inputs: ["[[IN:.*hip-binding.hip]]"], output: "[[BC1:.*bc]]" @@ -22,7 +22,7 @@ // RDCS: # "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[IN]]"], output: "[[HOSTOBJ:.*o]]" // RDCS: # "x86_64-unknown-linux-gnu" - "offload bundler", inputs: ["[[BC1]]", "[[BC2]]", "[[HOSTOBJ]]"], output: "{{.*}}" -// RUN: %clang -ccc-print-bindings -target x86_64-linux-gnu --offload-new-driver \ +// RUN: %clang -ccc-print-bindings --target=x86_64-linux-gnu --offload-new-driver \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: -c -fgpu-rdc 2>&1 | FileCheck -check-prefix=RDCS-NEW %s // RDCS-NEW: # "amdgcn-amd-amdhsa" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[HIP803:.+]]" @@ -31,7 +31,7 @@ // RDCS-NEW: # "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[INPUT]]", "[[HIPFB]]"], output: "{{.*}}" // RUN: touch %t.o -// RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -ccc-print-bindings --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -fgpu-rdc %t.o\ // RUN: 2>&1 | FileCheck %s @@ -45,7 +45,7 @@ // CHECK-NOT: offload bundler // CHECK: # "x86_64-unknown-linux-gnu" - "GNU::Linker", inputs: ["[[HOSTOBJ]]", "[[FATBINOBJ]]"], output: "a.out" -// RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -ccc-print-bindings --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o\ // RUN: 2>&1 | FileCheck -check-prefix=NORDC %s @@ -56,7 +56,7 @@ // Check to make sure we can generate multiple outputs for device-only // compilation and fail with '-o'. // -// RUN: %clang -### -target x86_64-linux-gnu --offload-new-driver -ccc-print-bindings \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-new-driver -ccc-print-bindings \ // RUN: --offload-arch=gfx90a --offload-arch=gfx908 --offload-device-only -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=MULTI-D-ONLY %s // MULTI-D-ONLY: # "amdgcn-amd-amdhsa" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[GFX908:.+]]" @@ -64,7 +64,7 @@ // MULTI-D-ONLY-NEXT: # "amdgcn-amd-amdhsa" - "clang", inputs: ["[[INPUT]]"], output: "[[GFX90a:.+]]" // MULTI-D-ONLY-NEXT: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[GFX90a]]"], output: "[[GFX90a_OUT:.+]]" // -// RUN: %clang -### -target x86_64-linux-gnu --offload-new-driver -ccc-print-bindings \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-new-driver -ccc-print-bindings \ // RUN: --offload-arch=gfx90a --offload-arch=gfx908 --offload-device-only -c -o %t %s 2>&1 \ // RUN: | FileCheck -check-prefix=MULTI-D-ONLY-O %s // MULTI-D-ONLY-O: error: cannot specify -o when generating multiple output files diff --git a/clang/test/Driver/hip-code-object-version.hip b/clang/test/Driver/hip-code-object-version.hip index cc5bafe..33aa39f 100644 --- a/clang/test/Driver/hip-code-object-version.hip +++ b/clang/test/Driver/hip-code-object-version.hip @@ -2,12 +2,12 @@ // Check bundle ID for code object v2. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mno-code-object-v3 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefixes=V2,V2-WARN %s -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=2 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V2 %s @@ -18,17 +18,17 @@ // Check bundle ID for code object v3. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-v3 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefixes=V3,V3-WARN %s -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=3 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V3 %s -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=4 -mcode-object-version=3 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V3 %s @@ -40,7 +40,7 @@ // Check bundle ID for code object version 4. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=4 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V4 %s @@ -51,7 +51,7 @@ // Check bundle ID for code object version 5. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=5 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V5 %s @@ -62,7 +62,7 @@ // Check bundle ID for code object version default -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=VD %s @@ -70,7 +70,7 @@ // Check invalid code object version option. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=1 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=INVALID %s @@ -81,7 +81,7 @@ // is passed to -cc1 and -cc1as, and -mcode-object-version is passed // to -cc1 but not -cc1as. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=5 \ // RUN: --offload-arch=gfx906 -nogpulib -save-temps \ // RUN: %s 2>&1 | FileCheck -check-prefix=CC1 %s @@ -89,7 +89,7 @@ // CC1: "-cc1" {{.*}}"-mcode-object-version=5" {{.*}}"-mllvm" "--amdhsa-code-object-version=5" // CC1: "-cc1as" {{.*}}"-mllvm" "--amdhsa-code-object-version=5" -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=5 \ // RUN: --offload-arch=gfx906 -nogpulib -save-temps \ // RUN: %s 2>&1 | FileCheck -check-prefix=CC1NEG %s @@ -99,7 +99,7 @@ // Check warnings are emitted for legacy options before -mcode-object-version options. // Check warnings are emitted only once. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -mno-code-object-v3 -mcode-object-v3 -mcode-object-version=4 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefixes=WARN %s diff --git a/clang/test/Driver/hip-cuid-hash.hip b/clang/test/Driver/hip-cuid-hash.hip index 0c7c2a7..f34200b 100644 --- a/clang/test/Driver/hip-cuid-hash.hip +++ b/clang/test/Driver/hip-cuid-hash.hip @@ -4,11 +4,11 @@ // Check CUID generated by hash. // The same CUID is generated for the same file with the same options. -// RUN: %clang -### -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1 -// RUN: %clang -### -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1 @@ -17,11 +17,11 @@ // Check CUID generated by hash. // Different CUID's are generated for the same file with different options. -// RUN: %clang -### -x hip -target x86_64-unknown-linux-gnu -DX=1 \ +// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=1 \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1 -// RUN: %clang -### -x hip -target x86_64-unknown-linux-gnu -DX=2 \ +// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=2 \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/../Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1 diff --git a/clang/test/Driver/hip-cuid.hip b/clang/test/Driver/hip-cuid.hip index 347dcac..07f53a0 100644 --- a/clang/test/Driver/hip-cuid.hip +++ b/clang/test/Driver/hip-cuid.hip @@ -4,7 +4,7 @@ // Check invalid -fuse-cuid= option. // RUN: not %clang -### -x hip \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ // RUN: -c -nogpulib -fuse-cuid=invalid \ @@ -15,7 +15,7 @@ // Check random CUID generator. // RUN: %clang -### -x hip \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ // RUN: -c -nogpulib -fuse-cuid=random \ @@ -26,7 +26,7 @@ // Check fixed CUID. // RUN: %clang -### -x hip \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ // RUN: -c -nogpulib -cuid=xyz_123 \ @@ -37,7 +37,7 @@ // Check fixed CUID override -fuse-cuid. // RUN: %clang -### -x hip \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ // RUN: -c -nogpulib -fuse-cuid=random -cuid=xyz_123 \ @@ -48,7 +48,7 @@ // Check hash CUID generator. // RUN: %clang -### -x hip \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ // RUN: -c -nogpulib -fuse-cuid=hash \ diff --git a/clang/test/Driver/hip-device-compile.hip b/clang/test/Driver/hip-device-compile.hip index 38ce42aa..775ebdb 100644 --- a/clang/test/Driver/hip-device-compile.hip +++ b/clang/test/Driver/hip-device-compile.hip @@ -6,7 +6,7 @@ // is specified. // Output unbundled bitcode. -// RUN: %clang -c -emit-llvm --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.bc -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -14,7 +14,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,BC,NBUN %s // Output bundled bitcode. -// RUN: %clang -c -emit-llvm --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.bc -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -22,7 +22,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,BCBUN %s // Output unbundled LLVM IR. -// RUN: %clang -c -S -emit-llvm --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c -S -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.ll -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -30,7 +30,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,LL,NBUN %s // Output bundled LLVM IR. -// RUN: %clang -c -S -emit-llvm --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c -S -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.ll -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -38,7 +38,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,LLBUN %s // Output unbundled assembly. -// RUN: %clang -c -S --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c -S --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.s -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -46,7 +46,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,ASM,NBUN %s // Output bundled assembly. -// RUN: %clang -c -S --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c -S --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.s -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -85,7 +85,7 @@ // specified. // Output bundled code objects. -// RUN: %clang -c --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -93,7 +93,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=OBJ,OBJ-BUN %s // Output unbundled code objects. -// RUN: %clang -c --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -101,7 +101,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=OBJ,OBJ-UBUN %s // Output bundled code objects. -// RUN: %clang --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -109,7 +109,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=OBJ,OBJ-BUN %s // Output unbundled code objects. -// RUN: %clang --cuda-device-only -### -target x86_64-linux-gnu \ +// RUN: %clang --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ diff --git a/clang/test/Driver/hip-device-libs.hip b/clang/test/Driver/hip-device-libs.hip index 286bf93..d276f6e 100644 --- a/clang/test/Driver/hip-device-libs.hip +++ b/clang/test/Driver/hip-device-libs.hip @@ -5,7 +5,7 @@ // expected denormal mode. // Test subtarget with flushing on by default. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ @@ -13,7 +13,7 @@ // Test subtarget with flushing off by ddefault. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ @@ -21,7 +21,7 @@ // Test explicit flag, opposite of target default. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -30,7 +30,7 @@ // Test explicit flag, opposite of target default. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ // RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -39,7 +39,7 @@ // Test explicit flag, same as target default. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -48,7 +48,7 @@ // Test explicit flag, same as target default. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ // RUN: -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -57,7 +57,7 @@ // Test last flag wins, not flushing -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ // RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -65,7 +65,7 @@ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -73,7 +73,7 @@ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -81,7 +81,7 @@ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 \ // RUN: -fno-gpu-flush-denormals-to-zero -fgpu-flush-denormals-to-zero \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -90,7 +90,7 @@ // Test --hip-device-lib-path flag -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 -nogpuinc \ // RUN: --hip-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ @@ -99,13 +99,13 @@ // Test environment variable HIP_DEVICE_LIB_PATH // RUN: env HIP_DEVICE_LIB_PATH=%S/Inputs/rocm/amdgcn/bitcode \ -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 -nogpuinc \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL // Test --gpu-instrument-lib -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: --gpu-instrument-lib=%S/Inputs/hip_multiple_inputs/instrument.bc \ @@ -113,67 +113,67 @@ // RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,INST // Test -fast-math -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -ffast-math --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=FAST // Test -ffinite-math-only -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -ffinite-math-only --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=FINITE // Test -funsafe-math-optimizations -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -funsafe-math-optimizations --rocm-path=%S/Inputs/rocm \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=UNSAFE // Test -fno-hip-fp32-correctly-rounded-divide-sqrt -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -fno-hip-fp32-correctly-rounded-divide-sqrt \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=DIVSQRT // Test default code object version. -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ABI4 // Test default code object version with old device library without abi_version_400.bc -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: --hip-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode-no-abi-ver \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=NOABI4 // Test -mcode-object-version=3 -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -mcode-object-version=3 \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ABI4 // Test -mcode-object-version=4 -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -mcode-object-version=4 \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ABI4 // Test -mcode-object-version=4 with old device library without abi_version_400.bc -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -mcode-object-version=4 \ // RUN: --hip-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode-no-abi-ver \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=NOABI4 // Test -mcode-object-version=5 -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -mcode-object-version=5 \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s --check-prefixes=ABI5 // Test -mcode-object-version=5 with old device library without abi_version_400.bc -// RUN: %clang -### -target x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -mcode-object-version=5 \ // RUN: --hip-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode-no-abi-ver \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ diff --git a/clang/test/Driver/hip-fpie-option.hip b/clang/test/Driver/hip-fpie-option.hip index 396be4f..c414828 100644 --- a/clang/test/Driver/hip-fpie-option.hip +++ b/clang/test/Driver/hip-fpie-option.hip @@ -3,30 +3,30 @@ // -fPIC and -fPIE only affects host relocation model. // device compilation always uses PIC. -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: -fPIC \ // RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIC %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: -fPIC \ // RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIC %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: -fPIE \ // RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: -fPIE \ // RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s diff --git a/clang/test/Driver/hip-gsplit-dwarf-options.hip b/clang/test/Driver/hip-gsplit-dwarf-options.hip index 74891e1..e9f8787 100644 --- a/clang/test/Driver/hip-gsplit-dwarf-options.hip +++ b/clang/test/Driver/hip-gsplit-dwarf-options.hip @@ -1,21 +1,21 @@ // REQUIRES: zlib, amdgpu-registered-target -// RUN: %clang -### -target x86_64-unknown-linux-gnu -c \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -c \ // RUN: --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \ // RUN: --offload-arch=gfx900 \ // RUN: -ggdb -gsplit-dwarf 2>&1 | FileCheck %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu -c \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -c \ // RUN: -fgpu-rdc --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \ // RUN: --offload-arch=gfx900 \ // RUN: -ggdb -gsplit-dwarf 2>&1 | FileCheck %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \ // RUN: --offload-arch=gfx900 \ // RUN: -ggdb -gsplit-dwarf 2>&1 | FileCheck %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: -fgpu-rdc --offload-arch=gfx906:xnack+ %s -nogpulib -nogpuinc \ // RUN: --offload-arch=gfx900 \ // RUN: -ggdb -gsplit-dwarf 2>&1 | FileCheck %s diff --git a/clang/test/Driver/hip-gz-options.hip b/clang/test/Driver/hip-gz-options.hip index 48275ce..8fba391 100644 --- a/clang/test/Driver/hip-gz-options.hip +++ b/clang/test/Driver/hip-gz-options.hip @@ -1,10 +1,10 @@ // REQUIRES: zlib, amdgpu-registered-target -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: -ggdb -gz=zlib 2>&1 | FileCheck %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \ // RUN: -ggdb -gz=zlib 2>&1 | FileCheck %s diff --git a/clang/test/Driver/hip-host-cpu-features.hip b/clang/test/Driver/hip-host-cpu-features.hip index 165b2f2..921f342 100644 --- a/clang/test/Driver/hip-host-cpu-features.hip +++ b/clang/test/Driver/hip-host-cpu-features.hip @@ -1,9 +1,9 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -c -target x86_64-linux-gnu -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTCPU -// RUN: %clang -### -c -target x86_64-linux-gnu -msse3 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTSSE3 -// RUN: %clang -### -c -target x86_64-linux-gnu --gpu-use-aux-triple-only -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=NOHOSTCPU +// RUN: %clang -### -c --target=x86_64-linux-gnu -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTCPU +// RUN: %clang -### -c --target=x86_64-linux-gnu -msse3 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTSSE3 +// RUN: %clang -### -c --target=x86_64-linux-gnu --gpu-use-aux-triple-only -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=NOHOSTCPU // HOSTCPU: "-cc1" "-triple" "amdgcn-amd-amdhsa" // HOSTCPU-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" diff --git a/clang/test/Driver/hip-include-path.hip b/clang/test/Driver/hip-include-path.hip index 8aa21e7..0bb10d2 100644 --- a/clang/test/Driver/hip-include-path.hip +++ b/clang/test/Driver/hip-include-path.hip @@ -3,15 +3,15 @@ // REQUIRES: libgcc // UNSUPPORTED: system-windows -// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ +// RUN: %clang -c -### --target=x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ // RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nogpulib %s 2>&1 \ // RUN: | FileCheck -check-prefixes=COMMON,CLANG,HIP %s -// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ +// RUN: %clang -c -### --target=x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ // RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nobuiltininc -nogpulib %s 2>&1 \ // RUN: | FileCheck -check-prefixes=COMMON,NOCLANG,HIP %s -// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ +// RUN: %clang -c -### --target=x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ // RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nogpuinc -nogpulib %s 2>&1 \ // RUN: | FileCheck -check-prefixes=COMMON,CLANG,NOHIP %s @@ -37,7 +37,7 @@ // NOCLANG-NOT: "{{[^"]*}}/lib{{[^"]*}}/clang/{{[^"]*}}/include" // NOHIP-NOT: "{{.*}}Inputs/rocm/include" -// RUN: %clang -c -### -target x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ +// RUN: %clang -c -### --target=x86_64-unknown-linux-gnu --cuda-gpu-arch=gfx900 \ // RUN: -std=c++11 --rocm-path=%S/Inputs/rocm -nogpulib %s 2>&1 \ // RUN: --hip-version=3.5 | FileCheck -check-prefixes=ROCM35 %s diff --git a/clang/test/Driver/hip-inputs.hip b/clang/test/Driver/hip-inputs.hip index 6bff2de..1e1bedb 100644 --- a/clang/test/Driver/hip-inputs.hip +++ b/clang/test/Driver/hip-inputs.hip @@ -1,19 +1,19 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -ccc-print-phases -target x86_64-linux-gnu \ +// RUN: %clang -ccc-print-phases --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 -c \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip 2>&1 \ // RUN: | FileCheck %s -// RUN: not %clang -ccc-print-phases -target x86_64-linux-gnu \ +// RUN: not %clang -ccc-print-phases --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 -c \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip 2>&1 \ // RUN: | FileCheck -check-prefix=MIX %s -// RUN: not %clang -ccc-print-phases -target x86_64-linux-gnu \ +// RUN: not %clang -ccc-print-phases --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 -c \ // RUN: --hip-link %S/Inputs/hip_multiple_inputs/a.cu 2>&1 \ // RUN: | FileCheck -check-prefix=MIX %s diff --git a/clang/test/Driver/hip-invalid-target-id.hip b/clang/test/Driver/hip-invalid-target-id.hip index dea8068..c74037d 100644 --- a/clang/test/Driver/hip-invalid-target-id.hip +++ b/clang/test/Driver/hip-invalid-target-id.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: not %clang -### -target x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx908 \ // RUN: --offload-arch=gfx908xnack \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -9,7 +9,7 @@ // NOPLUS: error: invalid target ID 'gfx908xnack' -// RUN: not %clang -### -target x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx900 \ // RUN: --offload-arch=gfx908:xnack+:xnack+ \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -17,7 +17,7 @@ // ORDER: error: invalid target ID 'gfx908:xnack+:xnack+' -// RUN: not %clang -### -target x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx908 \ // RUN: --offload-arch=gfx908:unknown+ \ // RUN: --offload-arch=gfx908+sramecc+unknown \ @@ -27,7 +27,7 @@ // UNK: error: invalid target ID 'gfx908:unknown+' -// RUN: not %clang -### -target x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx908 \ // RUN: --offload-arch=gfx908:sramecc+:unknown+ \ // RUN: --offload-arch=gfx900+xnack \ @@ -36,7 +36,7 @@ // MIXED: error: invalid target ID 'gfx908:sramecc+:unknown+' -// RUN: not %clang -### -target x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx908 \ // RUN: --offload-arch=gfx900:sramecc+ \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -44,7 +44,7 @@ // UNSUP: error: invalid target ID 'gfx900:sramecc+' -/ RUN: not %clang -### -target x86_64-linux-gnu \ +/ RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx908 \ // RUN: --offload-arch=gfx900:xnack \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -52,7 +52,7 @@ // NOSIGN: error: invalid target ID 'gfx900:xnack' -// RUN: not %clang -### -target x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx908 \ // RUN: --offload-arch=gfx900+xnack \ // RUN: --rocm-path=%S/Inputs/rocm \ @@ -60,7 +60,7 @@ // NOCOLON: error: invalid target ID 'gfx900+xnack' -// RUN: not %clang -### -target x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --offload-arch=gfx908 \ // RUN: --offload-arch=gfx908:xnack+ \ // RUN: --rocm-path=%S/Inputs/rocm \ diff --git a/clang/test/Driver/hip-launch-api.hip b/clang/test/Driver/hip-launch-api.hip index fbfa412..6cc03b8 100644 --- a/clang/test/Driver/hip-launch-api.hip +++ b/clang/test/Driver/hip-launch-api.hip @@ -3,14 +3,14 @@ // By default FE assumes -fhip-new-launch-api. -// RUN: %clang -### -target x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=NEW %s // NEW: "-fhip-new-launch-api" -// RUN: %clang -### -target x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: -fhip-new-launch-api 2>&1 | FileCheck -check-prefixes=NEW %s // NEW: "-fhip-new-launch-api" -// RUN: %clang -### -target x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: -fno-hip-new-launch-api 2>&1 | FileCheck -check-prefixes=OLD %s // OLD-NOT: "-fhip-new-launch-api" diff --git a/clang/test/Driver/hip-link-bundle-archive.hip b/clang/test/Driver/hip-link-bundle-archive.hip index 7ffe135..bb912d6 100644 --- a/clang/test/Driver/hip-link-bundle-archive.hip +++ b/clang/test/Driver/hip-link-bundle-archive.hip @@ -5,13 +5,13 @@ // RUN: touch %T/libhipBundled.a // RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc -L%T -lhipBundled \ // RUN: 2>&1 | FileCheck -check-prefix=GNU %s // RUN: touch %T/hipBundled2.lib // RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ -// RUN: -target x86_64-pc-windows-msvc \ +// RUN: --target=x86_64-pc-windows-msvc \ // RUN: -nogpulib %s -fgpu-rdc -L%T -lhipBundled2 \ // RUN: 2>&1 | FileCheck -check-prefix=MSVC %s diff --git a/clang/test/Driver/hip-link-save-temps.hip b/clang/test/Driver/hip-link-save-temps.hip index e780e56..735c8e8 100644 --- a/clang/test/Driver/hip-link-save-temps.hip +++ b/clang/test/Driver/hip-link-save-temps.hip @@ -4,7 +4,7 @@ // -fgpu-rdc link with output // RUN: touch %T/obj1.o // RUN: touch %T/obj2.o -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --hip-link -o executable -fgpu-rdc --cuda-gpu-arch=gfx900 \ // RUN: --offload-arch=gfx906 %T/obj1.o %T/obj2.o 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,OUT %s @@ -12,7 +12,7 @@ // -fgpu-rdc link without output // RUN: touch %T/obj1.o // RUN: touch %T/obj2.o -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --hip-link -fgpu-rdc --cuda-gpu-arch=gfx900 \ // RUN: --offload-arch=gfx906 %T/obj1.o %T/obj2.o 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,NOUT %s @@ -20,7 +20,7 @@ // -fgpu-rdc link with output and --emit-static-lib // RUN: touch %T/obj1.o // RUN: touch %T/obj2.o -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --hip-link -o libTest.a -fgpu-rdc --cuda-gpu-arch=gfx900 \ // RUN: --emit-static-lib \ // RUN: --offload-arch=gfx906 %T/obj1.o %T/obj2.o 2>&1 | \ @@ -29,7 +29,7 @@ // -fgpu-rdc link without output and --emit-static-lib // RUN: touch %T/obj1.o // RUN: touch %T/obj2.o -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --hip-link -fgpu-rdc --cuda-gpu-arch=gfx900 \ // RUN: --emit-static-lib \ // RUN: --offload-arch=gfx906 %T/obj1.o %T/obj2.o 2>&1 | \ diff --git a/clang/test/Driver/hip-link-shared-library.hip b/clang/test/Driver/hip-link-shared-library.hip index 895bd53..fc1f9f5 100644 --- a/clang/test/Driver/hip-link-shared-library.hip +++ b/clang/test/Driver/hip-link-shared-library.hip @@ -1,5 +1,5 @@ // RUN: touch %t.o -// RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -ccc-print-bindings --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o %S/Inputs/in.so \ // RUN: -fgpu-rdc 2>&1 | FileCheck %s diff --git a/clang/test/Driver/hip-link-static-library.hip b/clang/test/Driver/hip-link-static-library.hip index 4890d80..63675ff 100644 --- a/clang/test/Driver/hip-link-static-library.hip +++ b/clang/test/Driver/hip-link-static-library.hip @@ -2,7 +2,7 @@ // REQUIRES: amdgpu-registered-target // RUN: touch %t.o -// RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -ccc-print-bindings --target=x86_64-linux-gnu \ // RUN: --emit-static-lib \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -fgpu-rdc %t.o\ // RUN: 2>&1 | FileCheck %s @@ -17,7 +17,7 @@ // CHECK-NOT: offload bundler // CHECK: # "x86_64-unknown-linux-gnu" - "GNU::StaticLibTool", inputs: ["[[HOSTOBJ]]", "[[FATBINOBJ]]"], output: "a.out" -// RUN: %clang --hip-link -ccc-print-bindings -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -ccc-print-bindings --target=x86_64-linux-gnu \ // RUN: --emit-static-lib \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %t.o\ // RUN: 2>&1 | FileCheck -check-prefix=NORDC %s @@ -25,7 +25,7 @@ // NORDC-NOT: offload bundler // NORDC: # "x86_64-unknown-linux-gnu" - "GNU::StaticLibTool", inputs: ["{{.*o}}"], output: "a.out" -// RUN: %clang --hip-link -### -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -### --target=x86_64-linux-gnu \ // RUN: --emit-static-lib -lgcc \ // RUN: -Wl,--enable-new-dtags -Wl,--rpath=/opt \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -fgpu-rdc %t.o\ diff --git a/clang/test/Driver/hip-no-device-libs.hip b/clang/test/Driver/hip-no-device-libs.hip index 1393564..5d0ba02 100644 --- a/clang/test/Driver/hip-no-device-libs.hip +++ b/clang/test/Driver/hip-no-device-libs.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -nogpulib -target x86_64-linux-gnu \ +// RUN: %clang -### -nogpulib --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s diff --git a/clang/test/Driver/hip-offload-arch.hip b/clang/test/Driver/hip-offload-arch.hip index 770f398..12b28bd 100644 --- a/clang/test/Driver/hip-offload-arch.hip +++ b/clang/test/Driver/hip-offload-arch.hip @@ -1,6 +1,6 @@ // REQUIRES: x86-registered-target, amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --offload-arch=gfx1030 \ // RUN: --offload-arch=gfx1031 \ // RUN: -nogpuinc -nogpulib \ diff --git a/clang/test/Driver/hip-output-file-name.hip b/clang/test/Driver/hip-output-file-name.hip index fa34197..4b2091a 100644 --- a/clang/test/Driver/hip-output-file-name.hip +++ b/clang/test/Driver/hip-output-file-name.hip @@ -2,7 +2,7 @@ // REQUIRES: amdgpu-registered-target // Output bundled code objects for combined compilation. -// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: %clang -### -c --target=x86_64-linux-gnu -fgpu-rdc \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck %s @@ -13,42 +13,42 @@ // is used to bundle the final output. // Output bundled PPE for one GPU for mixed compliation. -// RUN: %clang -### -E -target x86_64-linux-gnu \ +// RUN: %clang -### -E --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output unbundled PPE for one GPU for device only compilation. -// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \ +// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s // Output bundled PPE for two GPUs for mixed compilation. -// RUN: %clang -### -E -target x86_64-linux-gnu \ +// RUN: %clang -### -E --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output bundled PPE for two GPUs for mixed compilation with -save-temps. -// RUN: %clang -### -E -save-temps -target x86_64-linux-gnu \ +// RUN: %clang -### -E -save-temps --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output unbundled PPE for two GPUs for device only compilation. -// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \ +// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s // Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output. -// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \ +// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --gpu-bundle-output \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output unbundled PPE for two GPUs for device only compilation with --no-gpu-bundle-output. -// RUN: %clang -### -E --cuda-device-only -target x86_64-linux-gnu \ +// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --no-gpu-bundle-output \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s // Output unbundled PPE for host only compilation. -// RUN: %clang -### -E --cuda-host-only -target x86_64-linux-gnu \ +// RUN: %clang -### -E --cuda-host-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s @@ -60,22 +60,22 @@ // Check -E with -o. // Output bundled PPE for two GPUs for mixed compilation. -// RUN: %clang -### -E -o test.cui -target x86_64-linux-gnu \ +// RUN: %clang -### -E -o test.cui --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=OUT %s // Output bundled PPE for two GPUs for mixed compilation. -// RUN: %clang -### -E -o test.cui -save-temps -target x86_64-linux-gnu \ +// RUN: %clang -### -E -o test.cui -save-temps --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=OUT %s // Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output. -// RUN: %clang -### -E -o test.cui --cuda-device-only -target x86_64-linux-gnu \ +// RUN: %clang -### -E -o test.cui --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 --gpu-bundle-output %s \ // RUN: 2>&1 | FileCheck -check-prefixes=OUT %s // Output unbundled PPE for two GPUs for device only compilation. -// RUN: %clang -### -E -o test.cui --cuda-host-only -target x86_64-linux-gnu \ +// RUN: %clang -### -E -o test.cui --cuda-host-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-OUT %s diff --git a/clang/test/Driver/hip-phases.hip b/clang/test/Driver/hip-phases.hip index d330ea8..375d2f8 100644 --- a/clang/test/Driver/hip-phases.hip +++ b/clang/test/Driver/hip-phases.hip @@ -9,14 +9,14 @@ // // Test single gpu architecture with complete compilation. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 %s 2>&1 \ // RUN: | FileCheck -check-prefixes=BIN,NRD,OLD %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --offload-new-driver --cuda-gpu-arch=gfx803 %s 2>&1 \ // RUN: | FileCheck -check-prefixes=BIN,NRD,NEW %s // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 -fgpu-rdc %s 2>&1 \ // RUN: | FileCheck -check-prefixes=BIN,RDC %s // @@ -48,7 +48,7 @@ // // Test single gpu architecture up to the assemble phase. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 %s -S 2>&1 \ // RUN: | FileCheck -check-prefixes=ASM %s // ASM-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]]) @@ -63,11 +63,11 @@ // // Test two gpu architectures with complete compilation with -fno-gpu-rdc. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s 2>&1 \ // RUN: | FileCheck -check-prefixes=NRD2,NCL2 %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s -c 2>&1 \ // RUN: | FileCheck -check-prefixes=NRD2 %s @@ -99,11 +99,11 @@ // // Test two gpu architectures with complete compilation with -fgpu-rdc. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s -fgpu-rdc 2>&1 \ // RUN: | FileCheck -check-prefixes=RDC2,RCL2 %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s -fgpu-rdc -c 2>&1 \ // RUN: | FileCheck -check-prefixes=RDC2,RC2 %s @@ -143,7 +143,7 @@ // // Test two gpu architecturess up to the assemble phase. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s -S 2>&1 \ // RUN: | FileCheck -check-prefixes=ASM2 %s // ASM2-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH1:gfx803]]) @@ -161,7 +161,7 @@ // Test single gpu architecture with complete compilation in host-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 %s --cuda-host-only 2>&1 \ // RUN: | FileCheck -check-prefixes=HBIN %s // HBIN-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (host-[[T]]) @@ -175,7 +175,7 @@ // Test single gpu architecture up to the assemble phase in host-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 %s --cuda-host-only -S 2>&1 \ // RUN: | FileCheck -check-prefixes=HASM %s // HASM-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (host-[[T]]) @@ -188,7 +188,7 @@ // Test two gpu architectures with complete compilation in host-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --cuda-host-only 2>&1 \ // RUN: | FileCheck -check-prefixes=HBIN2 %s // HBIN2-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (host-[[T]]) @@ -203,7 +203,7 @@ // Test two gpu architectures up to the assemble phase in host-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --cuda-host-only -S \ // RUN: 2>&1 | FileCheck -check-prefixes=HASM2 %s // HASM2-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (host-[[T]]) @@ -216,7 +216,7 @@ // Test single gpu architecture with complete compilation in device-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 %s --cuda-device-only 2>&1 \ // RUN: | FileCheck -check-prefixes=DBIN %s // DBIN-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]]) @@ -233,7 +233,7 @@ // Test single gpu architecture up to the assemble phase in device-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 %s --cuda-device-only -S --no-gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=DASM %s // DASM-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]]) @@ -248,7 +248,7 @@ // Test two gpu architectures with complete compilation in device-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu -ccc-print-phases \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu -ccc-print-phases \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --cuda-device-only \ // RUN: 2>&1 | FileCheck -check-prefixes=DBIN2 %s // DBIN2-DAG: [[P0:[0-9]+]]: input, "{{.*}}hip-phases.hip", [[T:hip]], (device-[[T]], [[ARCH:gfx803]]) @@ -272,19 +272,19 @@ // Test two gpu architectures up to the assemble phase in device-only // compilation mode. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -S -o %t.s 2>&1 \ // RUN: | FileCheck -check-prefixes=DASM2,DASM2-NOBUNDLE %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -S -o %t.s --no-gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=DASM2,DASM2-NOBUNDLE %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -S 2>&1 \ // RUN: | FileCheck -check-prefixes=DASM2,DASM2-NOBUNDLE %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -S --gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=DASM2,DASM2-BUNDLE %s @@ -308,19 +308,19 @@ // RUN: touch %T/obj1.o // RUN: touch %T/obj2.o // -// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ +// RUN: %clang --target=x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %T/obj1.o %T/obj2.o 2>&1 \ // RUN: | FileCheck -check-prefixes=L2,NL2 %s // -// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ +// RUN: %clang --target=x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %T/obj1.o %T/obj2.o \ // RUN: -fgpu-rdc 2>&1 | FileCheck -check-prefixes=L2,RL2,RL2-EM %s // -// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ +// RUN: %clang --target=x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %T/obj1.o %T/obj2.o \ // RUN: -fgpu-rdc --cuda-device-only 2>&1 | FileCheck -check-prefixes=L2,RL2,RL2-DEV %s -// RUN: %clang -target x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ +// RUN: %clang --target=x86_64-unknown-linux-gnu -ccc-print-phases --hip-link \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %T/obj1.o %T/obj2.o \ // RUN: -fgpu-rdc --cuda-device-only --no-gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=L2,RL2,RL2-NB %s @@ -348,12 +348,12 @@ // Test one gpu architectures up to the preprocessor expansion output phase in device-only // compilation mode. no bundle. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 %s \ // RUN: --cuda-device-only -E 2>&1 \ // RUN: | FileCheck -check-prefixes=PPE,PPEN %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 %s \ // RUN: --cuda-device-only -E --no-gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=PPE,PPEN %s @@ -361,7 +361,7 @@ // Test one gpu architectures up to the preprocessor expansion output phase in device-only // compilation mode. bundle. -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 %s \ // RUN: --cuda-device-only -E --gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=PPE,PPEB %s @@ -369,12 +369,12 @@ // Test two gpu architectures up to the preprocessor expansion output phase in device-only // compilation mode. no bundle. -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -E 2>&1 \ // RUN: | FileCheck -check-prefixes=PPE2,PPE2N %s -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -E --no-gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=PPE2,PPE2N %s @@ -382,7 +382,7 @@ // Test two gpu architectures up to the preprocessor expansion output phase in device-only // compilation mode. bundle. -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -E --gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=PPE2,PPE2B %s @@ -390,7 +390,7 @@ // Test one gpu architectures up to the LLVM IR output phase in device-only // compilation mode. no bundle. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 %s \ // RUN: --cuda-device-only -c -emit-llvm 2>&1 \ // RUN: | FileCheck -check-prefixes=LLVM %s @@ -398,7 +398,7 @@ // Test two gpu architectures up to the LLVM IR output phase in device-only // compilation mode. bundle. // -// RUN: %clang -x hip -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -c -emit-llvm -o %t.bc --gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=LLVM2 %s @@ -406,7 +406,7 @@ // Test two gpu architectures up to the LLVM IR output phase in device-only // compilation mode with bundled preprocessor expansion as input. bundle. // -// RUN: %clang -x hip-cpp-output -target x86_64-unknown-linux-gnu \ +// RUN: %clang -x hip-cpp-output --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: --cuda-device-only -c -emit-llvm -o %t.bc --gpu-bundle-output 2>&1 \ // RUN: | FileCheck -check-prefixes=PPELLVM2 %s @@ -463,50 +463,50 @@ // C++ program should have no offload kind. // Test compile empty.hip and empty.cpp. -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -c %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED %s -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -c %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED-NEG %s // Test compile and link empty.hip and empty.cpp. -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED %s -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED-NEG %s // Test compile and link empty.hip and empty.cpp with --hip-link -fgpu-rdc. -// RUN: %clang -target x86_64-unknown-linux-gnu --hip-link -fgpu-rdc \ +// RUN: %clang --target=x86_64-unknown-linux-gnu --hip-link -fgpu-rdc \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED %s -// RUN: %clang -target x86_64-unknown-linux-gnu --hip-link -fgpu-rdc \ +// RUN: %clang --target=x86_64-unknown-linux-gnu --hip-link -fgpu-rdc \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED-NEG %s // Test compile and link -x hip empty.hip and -x c++ empty.cpp. -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -x hip %S/Inputs/empty.hip -x c++ %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED %s -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -x hip %S/Inputs/empty.hip -x c++ %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED-NEG %s // Test compile and link -x hip empty.hip and empty.cpp. -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -x hip %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED2 %s -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -x hip %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED2-NEG %s // Test compile and link empty.hip and -x hip empty.cpp. -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: %S/Inputs/empty.hip -x hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED2 %s -// RUN: %clang -target x86_64-unknown-linux-gnu \ +// RUN: %clang --target=x86_64-unknown-linux-gnu \ // RUN: -ccc-print-phases --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -x hip %S/Inputs/empty.hip %S/Inputs/empty.cpp 2>&1 | FileCheck -check-prefixes=MIXED2-NEG %s diff --git a/clang/test/Driver/hip-printf.hip b/clang/test/Driver/hip-printf.hip index 7098540..709b830 100644 --- a/clang/test/Driver/hip-printf.hip +++ b/clang/test/Driver/hip-printf.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=gfx900 \ +// RUN: %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=gfx900 \ // RUN: %s 2>&1 | FileCheck %s // CHECK: [[CLANG:".*clang.*"]] "-cc1" diff --git a/clang/test/Driver/hip-rdc-device-only.hip b/clang/test/Driver/hip-rdc-device-only.hip index 97e9397..8c2cbf2 100644 --- a/clang/test/Driver/hip-rdc-device-only.hip +++ b/clang/test/Driver/hip-rdc-device-only.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ @@ -11,14 +11,14 @@ // With `-emit-llvm`, the output should be the same as the aforementioned line // as `-fgpu-rdc` in HIP implies `-emit-llvm`. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -c -emit-llvm -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip --gpu-bundle-output \ // RUN: 2>&1 | FileCheck -check-prefixes=COMMON,EMITBC %s -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -S -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ @@ -28,7 +28,7 @@ // With `-emit-llvm`, the output should be the same as the aforementioned line // as `-fgpu-rdc` in HIP implies `-emit-llvm`. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -S -emit-llvm -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ @@ -39,7 +39,7 @@ // output, there should 3 steps (preprocessor, compile, and backend) per source // and per target, totally 12 steps. -// RUN: %clang -### -save-temps -target x86_64-linux-gnu \ +// RUN: %clang -### -save-temps --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -S -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ @@ -48,7 +48,7 @@ // Check output one file without bundling cause error. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -S -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu -o %t.s --no-gpu-bundle-output \ diff --git a/clang/test/Driver/hip-runtime-libs-linux.hip b/clang/test/Driver/hip-runtime-libs-linux.hip index 641e676..1f13fc0 100644 --- a/clang/test/Driver/hip-runtime-libs-linux.hip +++ b/clang/test/Driver/hip-runtime-libs-linux.hip @@ -3,13 +3,13 @@ // RUN: touch %t.o // Test HIP runtime lib args specified by --rocm-path. -// RUN: %clang -### --hip-link -target x86_64-linux-gnu \ +// RUN: %clang -### --hip-link --target=x86_64-linux-gnu \ // RUN: --rocm-path=%S/Inputs/rocm %t.o 2>&1 \ // RUN: | FileCheck -check-prefixes=ROCM-PATH %s // Test HIP runtime lib args specified by environment variable ROCM_PATH. // RUN: env ROCM_PATH=%S/Inputs/rocm %clang -### --hip-link \ -// RUN: -target x86_64-linux-gnu %t.o 2>&1 \ +// RUN: --target=x86_64-linux-gnu %t.o 2>&1 \ // RUN: | FileCheck -check-prefixes=ROCM-PATH %s // Test detecting latest /opt/rocm-{release} directory. @@ -17,22 +17,22 @@ // RUN: mkdir -p %T/opt // RUN: cp -r %S/Inputs/rocm %T/opt/rocm-3.9.0-1234 // RUN: cp -r %S/Inputs/rocm %T/opt/rocm-3.10.0 -// RUN: %clang -### --hip-link -target x86_64-linux-gnu \ +// RUN: %clang -### --hip-link --target=x86_64-linux-gnu \ // RUN: --sysroot=%T %t.o 2>&1 \ // RUN: | FileCheck -check-prefixes=ROCM-REL %s // Test HIP runtime lib is not linked without --hip-link. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --rocm-path=%S/Inputs/rocm %t.o 2>&1 \ // RUN: | FileCheck -check-prefixes=NOHIPRT %s // Test HIP runtime lib is not linked with -nostdlib. -// RUN: %clang -### --hip-link -nostdlib -target x86_64-linux-gnu \ +// RUN: %clang -### --hip-link -nostdlib --target=x86_64-linux-gnu \ // RUN: --rocm-path=%S/Inputs/rocm %t.o 2>&1 \ // RUN: | FileCheck -check-prefixes=NOHIPRT %s // Test HIP runtime lib is not linked with -no-hip-rt. -// RUN: %clang -### --hip-link -no-hip-rt -target x86_64-linux-gnu \ +// RUN: %clang -### --hip-link -no-hip-rt --target=x86_64-linux-gnu \ // RUN: --rocm-path=%S/Inputs/rocm %t.o 2>&1 \ // RUN: | FileCheck -check-prefixes=NOHIPRT %s diff --git a/clang/test/Driver/hip-runtime-libs-msvc.hip b/clang/test/Driver/hip-runtime-libs-msvc.hip index e907d53..6d70fff 100644 --- a/clang/test/Driver/hip-runtime-libs-msvc.hip +++ b/clang/test/Driver/hip-runtime-libs-msvc.hip @@ -3,7 +3,7 @@ // RUN: touch %t.o // Test HIP runtime lib args specified by --rocm-path. -// RUN: %clang -### --hip-link -target x86_64-pc-windows-msvc \ +// RUN: %clang -### --hip-link --target=x86_64-pc-windows-msvc \ // RUN: --rocm-path=%S/Inputs/rocm %t.o 2>&1 \ // RUN: | FileCheck %s diff --git a/clang/test/Driver/hip-sanitize-options.hip b/clang/test/Driver/hip-sanitize-options.hip index 4ecb1b3..eadf3d4 100644 --- a/clang/test/Driver/hip-sanitize-options.hip +++ b/clang/test/Driver/hip-sanitize-options.hip @@ -1,36 +1,36 @@ // REQUIRES: x86-registered-target, amdgpu-registered-target -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ // RUN: -fsanitize=address \ // RUN: -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=NORDC %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ // RUN: -fsanitize=address -fno-gpu-sanitize \ // RUN: -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ // RUN: -fsanitize=address -fgpu-sanitize \ // RUN: -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=NORDC %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ // RUN: -fsanitize=address -fgpu-sanitize -fgpu-rdc \ // RUN: -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=RDC %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ // RUN: -fsanitize=address -fgpu-sanitize \ // RUN: -nogpuinc --rocm-path=%S/Inputs/rocm-invalid \ // RUN: %s 2>&1 | FileCheck -check-prefixes=FAIL %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fgpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=XNACK %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fgpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=XNACKNEG %s @@ -39,12 +39,12 @@ // Sanitizer should be disabled for all GPU's and there should be no warnings about unsupported // GPU. -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fno-gpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=NOGPU %s -// RUN: %clang -### -target x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fno-gpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=NOGPUNEG %s diff --git a/clang/test/Driver/hip-save-temps.hip b/clang/test/Driver/hip-save-temps.hip index 6319498e..30486a6 100644 --- a/clang/test/Driver/hip-save-temps.hip +++ b/clang/test/Driver/hip-save-temps.hip @@ -2,32 +2,32 @@ // REQUIRES: amdgpu-registered-target // -fno-gpu-rdc without -o with -c -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --cuda-gpu-arch=gfx900 -c %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,NORDC %s // -fno-gpu-rdc without -o -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --cuda-gpu-arch=gfx900 %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,NORDC,NOUT %s // -fno-gpu-rdc with -o -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: -o executable --cuda-gpu-arch=gfx900 %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,NORDC,WOUT %s // -fgpu-rdc without -o with -c -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: -fgpu-rdc --cuda-gpu-arch=gfx900 -c %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,RDC,RDCC %s // -fgpu-rdc without -o -// RUN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: -fgpu-rdc --cuda-gpu-arch=gfx900 %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,RDC,RDCL,NOUT %s // -fgpu-rdc with -o -// UN: %clang -### -target x86_64-linux-gnu -nogpulib -save-temps \ +// UN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // UN: -o executable -fgpu-rdc --cuda-gpu-arch=gfx900 %s 2>&1 | \ // UN: FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s diff --git a/clang/test/Driver/hip-std.hip b/clang/test/Driver/hip-std.hip index 2e47cbc..2c996f7 100644 --- a/clang/test/Driver/hip-std.hip +++ b/clang/test/Driver/hip-std.hip @@ -1,22 +1,22 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DEFAULT %s // DEFAULT: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++11" // DEFAULT: "-cc1"{{.*}}"-std=c++11" -// RUN: %clang -### -target x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: -std=c++17 %s 2>&1 | FileCheck -check-prefixes=SPECIFIED %s // SPECIFIED: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++17" // SPECIFIED: "-cc1"{{.*}}"-std=c++17" -// RUN: %clang -### -target x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ +// RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=MSVC-DEF %s // MSVC-DEF: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++14" // MSVC-DEF: "-cc1"{{.*}}"-std=c++14" -// RUN: %clang -### -target x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ +// RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ // RUN: -std=c++17 %s 2>&1 | FileCheck -check-prefixes=MSVC-SPEC %s // MSVC-SPEC: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++17" // MSVC-SPEC: "-cc1"{{.*}}"-std=c++17" diff --git a/clang/test/Driver/hip-target-id.hip b/clang/test/Driver/hip-target-id.hip index 3274e70..3ad70b0 100644 --- a/clang/test/Driver/hip-target-id.hip +++ b/clang/test/Driver/hip-target-id.hip @@ -1,14 +1,14 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip \ // RUN: --offload-arch=gfx908:xnack+:sramecc+ \ // RUN: --offload-arch=gfx908:xnack+:sramecc- \ // RUN: --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck %s -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip \ // RUN: --offload-arch=gfx908:xnack+:sramecc+ \ // RUN: --offload-arch=gfx908:xnack+:sramecc- \ @@ -16,7 +16,7 @@ // RUN: -save-temps \ // RUN: %s 2>&1 | FileCheck --check-prefixes=CHECK,TMP %s -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip \ // RUN: --offload-arch=gfx908:xnack+:sramecc+ \ // RUN: --offload-arch=gfx908:xnack+:sramecc- \ @@ -50,7 +50,7 @@ // Check canonicalization and repeating of target ID. -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip \ // RUN: --offload-arch=fiji \ // RUN: --offload-arch=gfx803 \ @@ -59,7 +59,7 @@ // RUN: %s 2>&1 | FileCheck -check-prefix=FIJI %s // FIJI: "-targets=host-x86_64-unknown-linux,hipv4-amdgcn-amd-amdhsa--gfx803" -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip \ // RUN: --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ \ diff --git a/clang/test/Driver/hip-toolchain-device-only.hip b/clang/test/Driver/hip-toolchain-device-only.hip index 21fc865..9e4a36f 100644 --- a/clang/test/Driver/hip-toolchain-device-only.hip +++ b/clang/test/Driver/hip-toolchain-device-only.hip @@ -1,6 +1,6 @@ // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --offload-arch=gfx803 --offload-arch=gfx900 \ // RUN: --cuda-device-only -nogpuinc -nogpulib -c \ // RUN: %s 2>&1 | FileCheck %s diff --git a/clang/test/Driver/hip-toolchain-dwarf.hip b/clang/test/Driver/hip-toolchain-dwarf.hip index 2a190c1..ba0d9a4 100644 --- a/clang/test/Driver/hip-toolchain-dwarf.hip +++ b/clang/test/Driver/hip-toolchain-dwarf.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -c -target x86_64-linux-gnu -fgpu-rdc \ +// RUN: %clang -### -c --target=x86_64-linux-gnu -fgpu-rdc \ // RUN: -x hip --cuda-gpu-arch=gfx803 %s \ // RUN: -Xarch_gfx803 -g 2>&1 | FileCheck %s -check-prefix=DWARF_VER diff --git a/clang/test/Driver/hip-toolchain-features.hip b/clang/test/Driver/hip-toolchain-features.hip index 31057cd..6ccd390 100644 --- a/clang/test/Driver/hip-toolchain-features.hip +++ b/clang/test/Driver/hip-toolchain-features.hip @@ -1,10 +1,10 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx906:xnack+ --cuda-gpu-arch=gfx900:xnack+ %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=XNACK -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx906:xnack- --cuda-gpu-arch=gfx900:xnack- %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=NOXNACK @@ -13,10 +13,10 @@ // XNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+xnack" // NOXNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-xnack" -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:sramecc+ %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=SRAM -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:sramecc- %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=NOSRAM @@ -25,10 +25,10 @@ // SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sramecc" // NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sramecc" -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mcumode 2>&1 | FileCheck %s -check-prefix=CUMODE -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mno-cumode 2>&1 | FileCheck %s -check-prefix=NOTCUMODE @@ -37,20 +37,20 @@ // CUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode" // NOTCUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-cumode" -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:xnack+:sramecc+ %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ALL3 -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:xnack-:sramecc- %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=NOALL3 // ALL3: {{.*}}clang{{.*}}"-target-feature" "+sramecc" "-target-feature" "+xnack" // NOALL3: {{.*}}clang{{.*}}"-target-feature" "-sramecc" "-target-feature" "-xnack" -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mtgsplit 2>&1 | FileCheck %s -check-prefix=TGSPLIT -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mno-tgsplit 2>&1 | FileCheck %s -check-prefix=NOTTGSPLIT @@ -59,7 +59,7 @@ // TGSPLIT: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+tgsplit" // NOTTGSPLIT: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-tgsplit" -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mcumode -mcumode -mno-cumode -mwavefrontsize64 -mcumode \ // RUN: -mwavefrontsize64 -mno-wavefrontsize64 2>&1 \ @@ -70,7 +70,7 @@ // DUP-NOT: "-target-feature" "{{.*}}wavefrontsize64" // DUP: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode" -// RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mno-wavefrontsize64 -mwavefrontsize64 2>&1 \ // RUN: | FileCheck %s -check-prefix=WAVE64 diff --git a/clang/test/Driver/hip-toolchain-mllvm.hip b/clang/test/Driver/hip-toolchain-mllvm.hip index 8cc3259..c7cb1f6 100644 --- a/clang/test/Driver/hip-toolchain-mllvm.hip +++ b/clang/test/Driver/hip-toolchain-mllvm.hip @@ -1,12 +1,12 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -mllvm -amdgpu-function-calls=0 \ // RUN: %s 2>&1 | FileCheck %s -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -fgpu-rdc -mllvm -amdgpu-function-calls=0 \ // RUN: %s 2>&1 | FileCheck -check-prefixes=CHECK,RDC %s diff --git a/clang/test/Driver/hip-toolchain-no-rdc.hip b/clang/test/Driver/hip-toolchain-no-rdc.hip index 180b3c2..8cc6899 100644 --- a/clang/test/Driver/hip-toolchain-no-rdc.hip +++ b/clang/test/Driver/hip-toolchain-no-rdc.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu -fno-gpu-rdc \ +// RUN: %clang -### --target=x86_64-linux-gnu -fno-gpu-rdc \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc --hip-device-lib=lib2.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -11,7 +11,7 @@ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,LINK %s -// RUN: %clang -### -target x86_64-linux-gnu -fno-gpu-rdc \ +// RUN: %clang -### --target=x86_64-linux-gnu -fno-gpu-rdc \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc --hip-device-lib=lib2.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -21,7 +21,7 @@ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK %s -// RUN: %clang -### -target x86_64-linux-gnu -fno-gpu-rdc \ +// RUN: %clang -### --target=x86_64-linux-gnu -fno-gpu-rdc \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc --hip-device-lib=lib2.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -33,7 +33,7 @@ // RUN: touch %T/a.o // RUN: touch %T/b.o -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --hip-link --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -fuse-ld=lld -nogpuinc \ // RUN: %T/a.o %T/b.o \ diff --git a/clang/test/Driver/hip-toolchain-opt.hip b/clang/test/Driver/hip-toolchain-opt.hip index 40cae56..a82323d 100644 --- a/clang/test/Driver/hip-toolchain-opt.hip +++ b/clang/test/Driver/hip-toolchain-opt.hip @@ -2,56 +2,56 @@ // REQUIRES: amdgpu-registered-target // RUN: %clang -### \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,DEFAULT %s // RUN: %clang -### -O0 \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O0 %s // RUN: %clang -### -O1 \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O1 %s // RUN: %clang -### -O2 \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O2 %s // RUN: %clang -### -O3 \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O3 %s // RUN: %clang -### -Os \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,Os %s // RUN: %clang -### -Oz \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,Oz %s // RUN: %clang -### -Og \ -// RUN: -target x86_64-unknown-linux-gnu \ +// RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ diff --git a/clang/test/Driver/hip-toolchain-rdc-separate.hip b/clang/test/Driver/hip-toolchain-rdc-separate.hip index a59f7b7..ce58c07 100644 --- a/clang/test/Driver/hip-toolchain-rdc-separate.hip +++ b/clang/test/Driver/hip-toolchain-rdc-separate.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -c -### -target x86_64-linux-gnu \ +// RUN: %clang -c -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc --hip-device-lib=lib2.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -83,19 +83,19 @@ // RUN: touch %T/a.o // RUN: touch %T/b.o -// RUN: %clang --hip-link -### -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -fuse-ld=lld -fgpu-rdc -nogpuinc \ // RUN: %T/a.o %T/b.o \ // RUN: 2>&1 | FileCheck -check-prefixes=LINK,LINK-HOST-UNBUNDLE,LLD-TMP,LINK-BUNDLE,LINK-EMBED %s -// RUN: %clang --hip-link -### -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -fuse-ld=lld -fgpu-rdc -nogpuinc \ // RUN: %T/a.o %T/b.o --cuda-device-only \ // RUN: 2>&1 | FileCheck -check-prefixes=LINK,LLD-TMP,LINK-BUNDLE,LINK-NOEMBED %s -// RUN: %clang --hip-link -### -target x86_64-linux-gnu \ +// RUN: %clang --hip-link -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -fuse-ld=lld -fgpu-rdc -nogpuinc \ // RUN: %T/a.o %T/b.o --cuda-device-only --no-gpu-bundle-output \ diff --git a/clang/test/Driver/hip-toolchain-rdc-static-lib.hip b/clang/test/Driver/hip-toolchain-rdc-static-lib.hip index 55cd3bd..66eac74 100644 --- a/clang/test/Driver/hip-toolchain-rdc-static-lib.hip +++ b/clang/test/Driver/hip-toolchain-rdc-static-lib.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: --emit-static-lib -nogpulib \ // RUN: -fuse-ld=lld -fgpu-rdc -nogpuinc \ diff --git a/clang/test/Driver/hip-toolchain-rdc.hip b/clang/test/Driver/hip-toolchain-rdc.hip index 794202a..09da934 100644 --- a/clang/test/Driver/hip-toolchain-rdc.hip +++ b/clang/test/Driver/hip-toolchain-rdc.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc --hip-device-lib=lib2.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -12,7 +12,7 @@ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,LNX %s -// RUN: %clang -### -target x86_64-pc-windows-msvc \ +// RUN: %clang -### --target=x86_64-pc-windows-msvc \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc --hip-device-lib=lib2.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ diff --git a/clang/test/Driver/hip-unbundle-preproc.hip b/clang/test/Driver/hip-unbundle-preproc.hip index d57d31e..2c470fa 100644 --- a/clang/test/Driver/hip-unbundle-preproc.hip +++ b/clang/test/Driver/hip-unbundle-preproc.hip @@ -1,6 +1,6 @@ // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx803 -nogpulib \ // RUN: -x hip-cpp-output %s 2>&1 | FileCheck %s @@ -11,7 +11,7 @@ // CHECK: {{".*clang.*"}} {{.*}}"-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fcuda-include-gpubinary" "[[FATBIN]]" {{.*}}"-o" "[[HOST_O:.*o]]" {{.*}}"[[HOST_PP]]" // CHECK: {{".*ld.*"}} {{.*}}"[[HOST_O]]" -// RUN: %clang -### -target x86_64-unknown-linux-gnu \ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx803 -nogpulib -fgpu-rdc \ // RUN: -x hip-cpp-output %s 2>&1 | FileCheck -check-prefix=RDC %s diff --git a/clang/test/Driver/hip-version.hip b/clang/test/Driver/hip-version.hip index 6999589..a9bac81 100644 --- a/clang/test/Driver/hip-version.hip +++ b/clang/test/Driver/hip-version.hip @@ -6,7 +6,7 @@ // RUN: | FileCheck -check-prefixes=FOUND %s // RUN: %clang -v --rocm-path=%S/Inputs/rocm 2>&1 \ -// RUN: -target amdgcn-amd-amdhsa \ +// RUN: --target=amdgcn-amd-amdhsa \ // RUN: | FileCheck -check-prefixes=FOUND %s // FOUND: Found HIP installation: {{.*Inputs.*rocm}}, version 3.6.20214-a2917cd @@ -17,7 +17,7 @@ // RUN: | FileCheck -check-prefixes=DEFAULT %s // RUN: %clang -v --rocm-path=%S 2>&1 \ -// RUN: -target amdgcn-amd-amdhsa \ +// RUN: --target=amdgcn-amd-amdhsa \ // RUN: | FileCheck -check-prefixes=DEFAULT %s // DEFAULT: Found HIP installation: {{.*Driver}}, version 3.5. @@ -26,7 +26,7 @@ // RUN: | FileCheck -check-prefixes=SPECIFIED %s // RUN: %clang -v --rocm-path=%S --hip-version=3.7.0 2>&1 \ -// RUN: -target amdgcn-amd-amdhsa \ +// RUN: --target=amdgcn-amd-amdhsa \ // RUN: | FileCheck -check-prefixes=SPECIFIED %s // SPECIFIED: Found HIP installation: {{.*Driver}}, version 3.7.0 diff --git a/clang/test/Driver/hip-wavefront-size.hip b/clang/test/Driver/hip-wavefront-size.hip index f9ec9f6..500a8af 100644 --- a/clang/test/Driver/hip-wavefront-size.hip +++ b/clang/test/Driver/hip-wavefront-size.hip @@ -1,18 +1,18 @@ // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: --rocm-path=%S/Inputs/rocm --cuda-device-only %s \ // RUN: 2>&1 | FileCheck %s --check-prefixes=WAVE64 // WAVE64: "-mlink-builtin-bitcode" "{{.*}}oclc_wavefrontsize64_on.bc"{{.*}} "-target-cpu" "gfx900" -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx1010 \ // RUN: --rocm-path=%S/Inputs/rocm --cuda-device-only %s \ // RUN: 2>&1 | FileCheck %s --check-prefixes=WAVE32 // WAVE32: "-mlink-builtin-bitcode" "{{.*}}oclc_wavefrontsize64_off.bc"{{.*}} "-target-cpu" "gfx1010" -// RUN: %clang -### -target x86_64-linux-gnu \ +// RUN: %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx1010 \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: --rocm-path=%S/Inputs/rocm --cuda-device-only %s \ diff --git a/clang/test/Driver/hip-windows-filename.hip b/clang/test/Driver/hip-windows-filename.hip index 7fe3866..d5318e2 100644 --- a/clang/test/Driver/hip-windows-filename.hip +++ b/clang/test/Driver/hip-windows-filename.hip @@ -1,6 +1,6 @@ // REQUIRES: system-windows, amdgpu-registered-target -// RUN: %clang -### -target x86_64-pc-windows-msvc \ +// RUN: %clang -### --target=x86_64-pc-windows-msvc \ // RUN: -x hip \ // RUN: --offload-arch=gfx908:xnack+ \ // RUN: -nogpuinc -nogpulib -save-temps \ diff --git a/clang/test/Driver/mcmodel.c b/clang/test/Driver/mcmodel.c index f8fb573..63b4320 100644 --- a/clang/test/Driver/mcmodel.c +++ b/clang/test/Driver/mcmodel.c @@ -1,13 +1,13 @@ -// RUN: %clang -target x86_64 -### -c -mcmodel=tiny %s 2>&1 | FileCheck --check-prefix=TINY %s -// RUN: %clang -target x86_64 -### -c -mcmodel=small %s 2>&1 | FileCheck --check-prefix=SMALL %s -// RUN: %clang -target x86_64 -### -S -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=KERNEL %s -// RUN: %clang -target x86_64 -### -c -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=MEDIUM %s -// RUN: %clang -target x86_64 -### -S -mcmodel=large %s 2>&1 | FileCheck --check-prefix=LARGE %s -// RUN: %clang -target powerpc-unknown-aix -### -S -mcmodel=medium %s 2> %t.log +// RUN: %clang --target=x86_64 -### -c -mcmodel=tiny %s 2>&1 | FileCheck --check-prefix=TINY %s +// RUN: %clang --target=x86_64 -### -c -mcmodel=small %s 2>&1 | FileCheck --check-prefix=SMALL %s +// RUN: %clang --target=x86_64 -### -S -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=KERNEL %s +// RUN: %clang --target=x86_64 -### -c -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=MEDIUM %s +// RUN: %clang --target=x86_64 -### -S -mcmodel=large %s 2>&1 | FileCheck --check-prefix=LARGE %s +// RUN: %clang --target=powerpc-unknown-aix -### -S -mcmodel=medium %s 2> %t.log // RUN: FileCheck --check-prefix=AIX-MCMEDIUM-OVERRIDE %s < %t.log // RUN: not %clang -c -mcmodel=lager %s 2>&1 | FileCheck --check-prefix=INVALID %s -// RUN: not %clang -c -target aarch64 -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=AARCH64-MEDIUM %s -// RUN: not %clang -c -target aarch64 -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=AARCH64-KERNEL %s +// RUN: not %clang -c --target=aarch64 -mcmodel=medium %s 2>&1 | FileCheck --check-prefix=AARCH64-MEDIUM %s +// RUN: not %clang -c --target=aarch64 -mcmodel=kernel %s 2>&1 | FileCheck --check-prefix=AARCH64-KERNEL %s // TINY: "-mcmodel=tiny" // SMALL: "-mcmodel=small" -- 2.7.4