Skip to content

Commit 40aab04

Browse files
committed
[test] Migrate -gcc-toolchain with space separator to --gcc-toolchain=
Space separated driver options are uncommon but Clang traditionally did not do a good job. --gcc-toolchain= is the preferred form.
1 parent 9e9d705 commit 40aab04

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

clang/test/Driver/fuse-ld.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@
6060

6161
// RUN: %clang %s -### -fuse-ld=ld \
6262
// RUN: -target arm-linux-androideabi \
63-
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
63+
// RUN: --gcc-toolchain=%S/Inputs/basic_android_tree 2>&1 \
6464
// RUN: | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD-TC
6565
// CHECK-ANDROID-ARM-LD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld
6666

6767
// RUN: %clang %s -### -fuse-ld=bfd \
6868
// RUN: -target arm-linux-androideabi \
69-
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
69+
// RUN: --gcc-toolchain=%S/Inputs/basic_android_tree 2>&1 \
7070
// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD-TC
7171
// CHECK-ANDROID-ARM-BFD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.bfd
7272

7373
// RUN: %clang %s -### -fuse-ld=gold \
7474
// RUN: -target arm-linux-androideabi \
75-
// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
75+
// RUN: --gcc-toolchain=%S/Inputs/basic_android_tree 2>&1 \
7676
// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD-TC
7777
// CHECK-ANDROID-ARM-GOLD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.gold
7878

clang/test/Driver/gcc-toolchain.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99
// Additionally check that the legacy spelling of the flag works.
1010
// RUN: %clangxx %s -### --target=x86_64-linux-gnu --sysroot= \
11-
// RUN: -gcc-toolchain %S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc 2>&1 | \
11+
// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc 2>&1 | \
1212
// RUN: FileCheck %s
1313
//
1414
// Test for header search toolchain detection.

libc/benchmarks/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set(LLVM_LINK_COMPONENTS Support)
1010
set(GOOGLE_BENCHMARK_TARGET_FLAGS ${BENCHMARK_DIALECT_FLAG})
1111
if (LIBCXX_BENCHMARK_GCC_TOOLCHAIN)
1212
set(GOOGLE_BENCHMARK_TARGET_FLAGS
13-
-gcc-toolchain ${LIBCXX_BENCHMARK_GCC_TOOLCHAIN})
13+
--gcc-toolchain=${LIBCXX_BENCHMARK_GCC_TOOLCHAIN})
1414
endif()
1515
string(REPLACE ";" " " GOOGLE_BENCHMARK_TARGET_FLAGS "${GOOGLE_BENCHMARK_TARGET_FLAGS}")
1616

libcxx/benchmarks/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ExternalProject_Add(google-benchmark-libcxx
4747
set(BENCHMARK_NATIVE_TARGET_FLAGS)
4848
if (LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN)
4949
set(BENCHMARK_NATIVE_TARGET_FLAGS
50-
-gcc-toolchain ${LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN})
50+
--gcc-toolchain=${LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN})
5151
endif()
5252
split_list(BENCHMARK_NATIVE_TARGET_FLAGS)
5353

lldb/packages/Python/lldbsuite/test/make/Android.rules

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ OBJCOPY ?= $(GCC_TOOLCHAIN)/bin/$(TOOL_PREFIX)-objcopy
6666
ARCHIVER ?= $(GCC_TOOLCHAIN)/bin/$(TOOL_PREFIX)-ar
6767

6868
ifeq "$(findstring clang,$(CC))" "clang"
69-
ARCH_CFLAGS += -target $(TRIPLE) -gcc-toolchain $(GCC_TOOLCHAIN)
70-
ARCH_LDFLAGS += -target $(TRIPLE) -gcc-toolchain $(GCC_TOOLCHAIN)
69+
ARCH_CFLAGS += -target $(TRIPLE) --gcc-toolchain=$(GCC_TOOLCHAIN)
70+
ARCH_LDFLAGS += -target $(TRIPLE) --gcc-toolchain=$(GCC_TOOLCHAIN)
7171
endif
7272

7373
ARCH_CFLAGS += --sysroot=$(NDK_ROOT)/sysroot \

llvm/docs/HowToCrossCompileBuiltinsOnArm.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ The cmake try compile stage fails
137137
At an early stage cmake will attempt to compile and link a simple C program to
138138
test if the toolchain is working.
139139

140-
This stage can often fail at link time if the ``--sysroot`` and
141-
``--gcc-toolchain`` options are not passed to the compiler. Check the
140+
This stage can often fail at link time if the ``--sysroot=`` and
141+
``--gcc-toolchain=`` options are not passed to the compiler. Check the
142142
``CMAKE_C_FLAGS`` and ``CMAKE_C_COMPILER_TARGET`` flags.
143143

144144
It can be useful to build a simple example outside of cmake with your toolchain
@@ -148,7 +148,7 @@ Clang uses the host header files
148148
--------------------------------
149149
On debian based systems it is possible to install multiarch support for
150150
arm-linux-gnueabi and arm-linux-gnueabihf. In many cases clang can successfully
151-
use this multiarch support when -gcc-toolchain and --sysroot are not supplied.
151+
use this multiarch support when ``--gcc-toolchain=`` and ``--sysroot=`` are not supplied.
152152
Unfortunately clang adds ``/usr/local/include`` before
153153
``/usr/include/arm-linux-gnueabihf`` leading to errors when compiling the hosts
154154
header files.

0 commit comments

Comments
 (0)