2018-06-28 11:11:52 +08:00
|
|
|
// RUN: %clang %s -### -no-canonical-prefixes --target=x86_64-fuchsia \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \
|
2017-09-12 09:28:37 +08:00
|
|
|
// RUN: | FileCheck -check-prefixes=CHECK,CHECK-X86_64 %s
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: %clang %s -### -no-canonical-prefixes --target=aarch64-fuchsia \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \
|
2017-09-12 09:28:37 +08:00
|
|
|
// RUN: | FileCheck -check-prefixes=CHECK,CHECK-AARCH64 %s
|
2019-11-20 11:56:54 +08:00
|
|
|
// RUN: %clang %s -### -no-canonical-prefixes --target=riscv64-fuchsia \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: --sysroot=%S/platform -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: | FileCheck -check-prefixes=CHECK,CHECK-RISCV64 %s
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: {{.*}}clang{{.*}}" "-cc1"
|
2019-11-20 11:56:54 +08:00
|
|
|
// CHECK-X86_64: "-triple" "x86_64-unknown-fuchsia"
|
|
|
|
// CHECK-AARCH64: "-triple" "aarch64-unknown-fuchsia"
|
|
|
|
// CHECK-RISCV64: "-triple" "riscv64-unknown-fuchsia"
|
2017-11-22 09:38:31 +08:00
|
|
|
// CHECK: "--mrelax-relocations"
|
2017-09-12 09:28:37 +08:00
|
|
|
// CHECK: "-munwind-tables"
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
|
2019-10-29 05:19:38 +08:00
|
|
|
// CHECK-AARCH64: "-fsanitize=shadow-call-stack"
|
|
|
|
// CHECK-X86_64: "-fsanitize=safe-stack"
|
2018-03-07 10:49:58 +08:00
|
|
|
// CHECK: "-stack-protector" "2"
|
2020-03-10 03:25:24 +08:00
|
|
|
// CHECK-NOT: "-fcommon"
|
2020-05-10 04:44:20 +08:00
|
|
|
// CHECK: {{.*}}ld.lld{{.*}}" "-z" "max-page-size=4096" "-z" "now" "-z" "rodynamic" "-z" "separate-loadable-segments" "--pack-dyn-relocs=relr"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "--sysroot=[[SYSROOT]]"
|
|
|
|
// CHECK: "-pie"
|
|
|
|
// CHECK: "--build-id"
|
2017-08-04 10:39:27 +08:00
|
|
|
// CHECK: "--hash-style=gnu"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "-dynamic-linker" "ld.so.1"
|
|
|
|
// CHECK: Scrt1.o
|
|
|
|
// CHECK-NOT: crti.o
|
|
|
|
// CHECK-NOT: crtbegin.o
|
2017-07-13 06:14:41 +08:00
|
|
|
// CHECK: "-L[[SYSROOT]]{{/|\\\\}}lib"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-X86_64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.builtins.a"
|
|
|
|
// CHECK-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.builtins.a"
|
2019-11-20 11:56:54 +08:00
|
|
|
// CHECK-RISCV64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}riscv64-fuchsia{{/|\\\\}}libclang_rt.builtins.a"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "-lc"
|
|
|
|
// CHECK-NOT: crtend.o
|
|
|
|
// CHECK-NOT: crtn.o
|
|
|
|
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -rtlib=libgcc -fuse-ld=lld 2>&1 \
|
2016-10-06 14:08:09 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-RTLIB
|
|
|
|
// CHECK-RTLIB: error: invalid runtime library name in argument '-rtlib=libgcc'
|
|
|
|
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -static -fuse-ld=lld 2>&1 \
|
2016-10-06 14:08:09 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-STATIC
|
|
|
|
// CHECK-STATIC: "-Bstatic"
|
|
|
|
// CHECK-STATIC: "-Bdynamic"
|
|
|
|
// CHECK-STATIC: "-lc"
|
|
|
|
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -shared -fuse-ld=lld 2>&1 \
|
2016-10-06 14:08:09 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SHARED
|
|
|
|
// CHECK-SHARED-NOT: "-pie"
|
|
|
|
// CHECK-SHARED: "-shared"
|
|
|
|
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -r -fuse-ld=lld 2>&1 \
|
2016-10-06 14:08:09 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-RELOCATABLE
|
|
|
|
// CHECK-RELOCATABLE-NOT: "-pie"
|
|
|
|
// CHECK-RELOCATABLE-NOT: "--build-id"
|
|
|
|
// CHECK-RELOCATABLE: "-r"
|
2017-02-24 11:17:41 +08:00
|
|
|
|
2019-02-17 09:02:40 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -nodefaultlibs -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-NODEFAULTLIBS
|
|
|
|
// CHECK-NODEFAULTLIBS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-NODEFAULTLIBS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.builtins.a"
|
2019-02-17 09:02:40 +08:00
|
|
|
// CHECK-NODEFAULTLIBS-NOT: "-lc"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -nostdlib -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-NOSTDLIB
|
|
|
|
// CHECK-NOSTDLIB: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-NOSTDLIB-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.builtins.a"
|
2019-02-17 09:02:40 +08:00
|
|
|
// CHECK-NOSTDLIB-NOT: "-lc"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -nolibc -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-NOLIBC
|
|
|
|
// CHECK-NOLIBC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-NOLIBC: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.builtins.a"
|
2019-02-17 09:02:40 +08:00
|
|
|
// CHECK-NOLIBC-NOT: "-lc"
|
|
|
|
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
2017-02-24 11:17:41 +08:00
|
|
|
// RUN: -fsanitize=safe-stack 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2017-02-24 11:17:41 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SAFESTACK
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK-SAFESTACK: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2017-02-24 11:17:41 +08:00
|
|
|
// CHECK-SAFESTACK: "-fsanitize=safe-stack"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-SAFESTACK-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.safestack.a"
|
2017-08-17 03:06:05 +08:00
|
|
|
// CHECK-SAFESTACK-NOT: "__safestack_init"
|
2017-08-04 07:02:22 +08:00
|
|
|
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
2017-08-04 07:02:22 +08:00
|
|
|
// RUN: -fsanitize=address 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2017-08-04 07:02:22 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ASAN-X86
|
2018-10-30 04:37:52 +08:00
|
|
|
// CHECK-ASAN-X86: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2017-08-04 07:02:22 +08:00
|
|
|
// CHECK-ASAN-X86: "-fsanitize=address"
|
|
|
|
// CHECK-ASAN-X86: "-fsanitize-address-globals-dead-stripping"
|
|
|
|
// CHECK-ASAN-X86: "-dynamic-linker" "asan/ld.so.1"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-ASAN-X86: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.asan.so"
|
|
|
|
// CHECK-ASAN-X86: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.asan-preinit.a"
|
2017-08-04 07:02:22 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fsanitize=address 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2017-08-04 07:02:22 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ASAN-AARCH64
|
2018-10-30 04:37:52 +08:00
|
|
|
// CHECK-ASAN-AARCH64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2019-10-29 05:19:38 +08:00
|
|
|
// CHECK-ASAN-AARCH64: "-fsanitize=address,shadow-call-stack"
|
2017-08-04 07:02:22 +08:00
|
|
|
// CHECK-ASAN-AARCH64: "-fsanitize-address-globals-dead-stripping"
|
|
|
|
// CHECK-ASAN-AARCH64: "-dynamic-linker" "asan/ld.so.1"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-ASAN-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.asan.so"
|
|
|
|
// CHECK-ASAN-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.asan-preinit.a"
|
2017-08-04 07:02:22 +08:00
|
|
|
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
2017-08-04 07:02:22 +08:00
|
|
|
// RUN: -fsanitize=address -fPIC -shared 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2017-08-04 07:02:22 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ASAN-SHARED
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK-ASAN-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2017-08-04 07:02:22 +08:00
|
|
|
// CHECK-ASAN-SHARED: "-fsanitize=address"
|
|
|
|
// CHECK-ASAN-SHARED: "-fsanitize-address-globals-dead-stripping"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-ASAN-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.asan.so"
|
|
|
|
// CHECK-ASAN-SHARED-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.asan-preinit.a"
|
2017-12-22 06:04:31 +08:00
|
|
|
|
2018-01-19 12:08:06 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
|
|
|
// RUN: -fsanitize=fuzzer 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2018-01-19 12:08:06 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-FUZZER-X86
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK-FUZZER-X86: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2018-03-07 10:49:58 +08:00
|
|
|
// CHECK-FUZZER-X86: "-fsanitize=fuzzer,fuzzer-no-link,safe-stack"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-FUZZER-X86: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.fuzzer.a"
|
2018-01-19 12:08:06 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fsanitize=fuzzer 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2018-01-19 12:08:06 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-FUZZER-AARCH64
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK-FUZZER-AARCH64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2019-10-29 05:19:38 +08:00
|
|
|
// CHECK-FUZZER-AARCH64: "-fsanitize=fuzzer,fuzzer-no-link,shadow-call-stack"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-FUZZER-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.fuzzer.a"
|
2018-01-19 12:08:06 +08:00
|
|
|
|
2017-12-22 06:04:31 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
|
|
|
// RUN: -fsanitize=scudo 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2017-12-22 06:04:31 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SCUDO-X86
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK-SCUDO-X86: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2018-03-07 10:49:58 +08:00
|
|
|
// CHECK-SCUDO-X86: "-fsanitize=safe-stack,scudo"
|
2017-12-22 06:04:31 +08:00
|
|
|
// CHECK-SCUDO-X86: "-pie"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-SCUDO-X86: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.scudo.so"
|
2017-12-22 06:04:31 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fsanitize=scudo 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2017-12-22 06:04:31 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SCUDO-AARCH64
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK-SCUDO-AARCH64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2019-10-29 05:19:38 +08:00
|
|
|
// CHECK-SCUDO-AARCH64: "-fsanitize=shadow-call-stack,scudo"
|
2017-12-22 06:04:31 +08:00
|
|
|
// CHECK-SCUDO-AARCH64: "-pie"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-SCUDO-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.scudo.so"
|
2017-12-22 06:04:31 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
|
|
|
// RUN: -fsanitize=scudo -fPIC -shared 2>&1 \
|
2018-06-28 11:11:52 +08:00
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2017-12-22 06:04:31 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SCUDO-SHARED
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK-SCUDO-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2018-03-07 10:49:58 +08:00
|
|
|
// CHECK-SCUDO-SHARED: "-fsanitize=safe-stack,scudo"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-SCUDO-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.scudo.so"
|
2018-06-05 09:50:59 +08:00
|
|
|
|
2020-01-28 15:36:24 +08:00
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fsanitize=leak 2>&1 \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: -fuse-ld=lld \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-LSAN-AARCH64
|
|
|
|
// CHECK-LSAN-AARCH64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
|
|
// CHECK-LSAN-AARCH64: "-fsanitize=leak,shadow-call-stack"
|
|
|
|
// CHECK-LSAN-AARCH64: "-pie"
|
|
|
|
// CHECK-LSAN-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.lsan.a"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
|
|
|
// RUN: -fsanitize=leak 2>&1 \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: -fuse-ld=lld \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-LSAN-X86
|
|
|
|
// CHECK-LSAN-X86: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
|
|
// CHECK-LSAN-X86: "-fsanitize=leak,safe-stack"
|
|
|
|
// CHECK-LSAN-X86: "-pie"
|
|
|
|
// CHECK-LSAN-X86: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.lsan.a"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fsanitize=leak -fPIC -shared 2>&1 \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: -fuse-ld=lld \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-LSAN-SHARED
|
|
|
|
// CHECK-LSAN-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
|
|
// CHECK-LSAN-SHARED: "-fsanitize=leak,shadow-call-stack"
|
|
|
|
// CHECK-LSAN-SHARED-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.lsan.a"
|
|
|
|
|
2018-11-22 10:36:47 +08:00
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
|
|
|
// RUN: -fxray-instrument -fxray-modes=xray-basic \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-XRAY-X86
|
|
|
|
// CHECK-XRAY-X86: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
|
|
// CHECK-XRAY-X86: "-fxray-instrument"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-XRAY-X86: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.xray.a"
|
|
|
|
// CHECK-XRAY-X86: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.xray-basic.a"
|
2018-11-22 10:36:47 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fxray-instrument -fxray-modes=xray-basic \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-XRAY-AARCH64
|
|
|
|
// CHECK-XRAY-AARCH64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
|
|
// CHECK-XRAY-AARCH64: "-fxray-instrument"
|
2019-05-28 07:23:50 +08:00
|
|
|
// CHECK-XRAY-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.xray.a"
|
|
|
|
// CHECK-XRAY-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.xray-basic.a"
|
2018-11-22 10:36:47 +08:00
|
|
|
|
2018-06-05 09:50:59 +08:00
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -O3 -flto -mcpu=cortex-a53 2>&1 \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2018-06-05 09:50:59 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-LTO
|
|
|
|
// CHECK-LTO: "-plugin-opt=mcpu=cortex-a53"
|
|
|
|
// CHECK-LTO: "-plugin-opt=O3"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
|
|
|
// RUN: -flto=thin -flto-jobs=8 2>&1 \
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: -fuse-ld=lld \
|
2018-06-05 09:50:59 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-THINLTO
|
|
|
|
// CHECK-THINLTO: "-plugin-opt=mcpu=x86-64"
|
|
|
|
// CHECK-THINLTO: "-plugin-opt=thinlto"
|
|
|
|
// CHECK-THINLTO: "-plugin-opt=jobs=8"
|
2018-10-16 05:30:32 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
2020-12-08 10:40:31 +08:00
|
|
|
// RUN: -gsplit-dwarf -g -c %s 2>&1 \
|
2018-10-16 05:30:32 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SPLIT-DWARF
|
2019-06-15 22:07:43 +08:00
|
|
|
// CHECK-SPLIT-DWARF: "-split-dwarf-output" "fuchsia.dwo"
|
2020-06-05 06:47:05 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fprofile-instr-generate -fcoverage-mapping \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-PROFRT-AARCH64
|
|
|
|
// CHECK-PROFRT-AARCH64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
|
|
// CHECK-PROFRT-AARCH64: "-u__llvm_profile_runtime"
|
|
|
|
// CHECK-PROFRT-AARCH64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}aarch64-fuchsia{{/|\\\\}}libclang_rt.profile.a"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia \
|
|
|
|
// RUN: -fprofile-instr-generate -fcoverage-mapping \
|
|
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
|
|
|
|
// RUN: -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-PROFRT-X86_64
|
|
|
|
// CHECK-PROFRT-X86_64: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
|
|
// CHECK-PROFRT-X86_64: "-u__llvm_profile_runtime"
|
|
|
|
// CHECK-PROFRT-X86_64: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}libclang_rt.profile.a"
|