2018-11-04 11:53:07 +08:00
|
|
|
// RUN: %clangxx %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 | FileCheck %s
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: {{.*}}clang{{.*}}" "-cc1"
|
2017-07-13 06:14:41 +08:00
|
|
|
// CHECK: "-triple" "x86_64-fuchsia"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "-fuse-init-array"
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
|
2018-06-28 11:11:52 +08:00
|
|
|
// CHECK: "-internal-isystem" "{{.*[/\\]}}include{{/|\\\\}}c++{{/|\\\\}}v1"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
|
2017-10-24 05:31:05 +08:00
|
|
|
// CHECK: {{.*}}ld.lld{{.*}}" "-z" "rodynamic"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK: "--sysroot=[[SYSROOT]]"
|
|
|
|
// CHECK: "-pie"
|
|
|
|
// CHECK: "--build-id"
|
|
|
|
// 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"
|
2018-11-03 09:43:25 +08:00
|
|
|
// CHECK: "--push-state"
|
|
|
|
// CHECK: "--as-needed"
|
|
|
|
// CHECK: "-lc++"
|
|
|
|
// CHECK: "-lm"
|
|
|
|
// CHECK: "--pop-state"
|
2018-11-04 11:53:07 +08:00
|
|
|
// CHECK: "[[RESOURCE_DIR]]{{/|\\\\}}x86_64-fuchsia{{/|\\\\}}lib{{/|\\\\}}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: %clangxx %s -### --target=x86_64-unknown-fuchsia -stdlib=libstdc++ \
|
|
|
|
// RUN: -fuse-ld=lld 2>&1 \
|
2016-10-06 14:08:09 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-STDLIB
|
|
|
|
// CHECK-STDLIB: error: invalid library name in argument '-stdlib=libstdc++'
|
|
|
|
|
2018-08-07 01:35:44 +08:00
|
|
|
// RUN: %clangxx %s -### --target=x86_64-unknown-fuchsia -static-libstdc++ \
|
|
|
|
// RUN: -fuse-ld=lld 2>&1 \
|
2016-10-06 14:08:09 +08:00
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-STATIC
|
2018-11-03 09:43:25 +08:00
|
|
|
// CHECK-STATIC: "--push-state"
|
|
|
|
// CHECK-STATIC: "--as-needed"
|
2018-11-05 06:38:47 +08:00
|
|
|
// CHECK-STATIC: "-Bstatic"
|
2018-05-12 04:42:31 +08:00
|
|
|
// CHECK-STATIC: "-lc++"
|
2018-11-05 06:38:47 +08:00
|
|
|
// CHECK-STATIC: "-Bdynamic"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK-STATIC: "-lm"
|
2018-11-03 09:43:25 +08:00
|
|
|
// CHECK-STATIC: "--pop-state"
|
2016-10-06 14:08:09 +08:00
|
|
|
// CHECK-STATIC: "-lc"
|
2019-02-17 09:02:40 +08:00
|
|
|
|
|
|
|
// RUN: %clang %s -### --target=x86_64-fuchsia -nostdlib++ -fuse-ld=lld 2>&1 \
|
|
|
|
// RUN: | FileCheck %s -check-prefix=CHECK-NOSTDLIBXX
|
|
|
|
// CHECK-NOSTDLIBXX-NOT: "-lc++"
|
|
|
|
// CHECK-NOSTDLIBXX-NOT: "-lm"
|
|
|
|
// CHECK-NOSTDLIBXX: "-lc"
|