2016-10-06 17:40:37 +08:00
|
|
|
// RUN: %clang %s -### -no-canonical-prefixes --target=x86_64-unknown-fuchsia \
|
2017-01-08 18:04:07 +08:00
|
|
|
// RUN: --sysroot=%S/platform -fuse-ld=ld 2>&1 | FileCheck %s
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: {{.*}}clang{{.*}}" "-cc1"
|
|
|
|
// CHECK: "-fuse-init-array"
|
|
|
|
// CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
|
|
|
|
// CHECK: {{.*}}lld{{.*}}" "-flavor" "gnu"
|
2017-07-19 07:23:16 +08:00
|
|
|
// CHECK: "-z" "rodynamic"
|
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"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "{{.*[/\\]}}libclang_rt.builtins-x86_64.a"
|
|
|
|
// CHECK: "-lc"
|
|
|
|
// CHECK-NOT: crtend.o
|
|
|
|
// CHECK-NOT: crtn.o
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-unknown-fuchsia -rtlib=libgcc 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-RTLIB
|
|
|
|
// CHECK-RTLIB: error: invalid runtime library name in argument '-rtlib=libgcc'
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-unknown-fuchsia -static 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-STATIC
|
|
|
|
// CHECK-STATIC: "-Bstatic"
|
|
|
|
// CHECK-STATIC: "-Bdynamic"
|
|
|
|
// CHECK-STATIC: "-lc"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-unknown-fuchsia -shared 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SHARED
|
|
|
|
// CHECK-SHARED-NOT: "-pie"
|
|
|
|
// CHECK-SHARED: "-shared"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-unknown-fuchsia -r 2>&1 \
|
|
|
|
// 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
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-unknown-fuchsia \
|
|
|
|
// RUN: -fsanitize=safe-stack 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-SAFESTACK
|
|
|
|
// CHECK-SAFESTACK: "-fsanitize=safe-stack"
|
2017-08-04 07:02:22 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-unknown-fuchsia \
|
|
|
|
// RUN: -fsanitize=address 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ASAN-X86
|
|
|
|
// CHECK-ASAN-X86: "-fsanitize=address"
|
|
|
|
// CHECK-ASAN-X86: "-fsanitize-address-globals-dead-stripping"
|
|
|
|
// CHECK-ASAN-X86: "-dynamic-linker" "asan/ld.so.1"
|
|
|
|
// CHECK-ASAN-X86: "{{.*[/\\]}}libclang_rt.asan-x86_64.so"
|
|
|
|
// CHECK-ASAN-X86: "{{.*[/\\]}}libclang_rt.asan-preinit-x86_64.a"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=aarch64-fuchsia \
|
|
|
|
// RUN: -fsanitize=address 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ASAN-AARCH64
|
|
|
|
// CHECK-ASAN-AARCH64: "-fsanitize=address"
|
|
|
|
// CHECK-ASAN-AARCH64: "-fsanitize-address-globals-dead-stripping"
|
|
|
|
// CHECK-ASAN-AARCH64: "-dynamic-linker" "asan/ld.so.1"
|
|
|
|
// CHECK-ASAN-AARCH64: "{{.*[/\\]}}libclang_rt.asan-aarch64.so"
|
|
|
|
// CHECK-ASAN-AARCH64: "{{.*[/\\]}}libclang_rt.asan-preinit-aarch64.a"
|
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-unknown-fuchsia \
|
|
|
|
// RUN: -fsanitize=address -fPIC -shared 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-ASAN-SHARED
|
|
|
|
// CHECK-ASAN-SHARED: "-fsanitize=address"
|
|
|
|
// CHECK-ASAN-SHARED: "-fsanitize-address-globals-dead-stripping"
|
|
|
|
// CHECK-ASAN-SHARED: "{{.*[/\\]}}libclang_rt.asan-x86_64.so"
|
|
|
|
// CHECK-ASAN-SHARED-NOT: "{{.*[/\\]}}libclang_rt.asan-preinit-x86_64.a"
|