|
215 | 215 |
|
216 | 216 | // RUN: %clang --target=riscv32 %s -emit-llvm -S -o - | FileCheck %s
|
217 | 217 |
|
| 218 | +// Check that "--no-relax" is forwarded to the linker for RISC-V (RISCVToolchain.cpp). |
| 219 | +// RUN: env "PATH=" %clang %s -### 2>&1 -mno-relax \ |
| 220 | +// RUN: --target=riscv32-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ |
| 221 | +// RUN: -march=rv32imac -mabi=lp32\ |
| 222 | +// RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ |
| 223 | +// RUN: | FileCheck --check-prefix=CHECK-RV32-NORELAX %s |
| 224 | +// CHECK-RV32-NORELAX: "--no-relax" |
| 225 | + |
| 226 | +// Check that "--no-relax" is not forwarded to the linker for RISC-V (RISCVToolchain.cpp). |
| 227 | +// RUN:env "PATH=" %clang %s -### 2>&1 \ |
| 228 | +// RUN: --target=riscv32-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ |
| 229 | +// RUN: -march=rv32imac -mabi=lp32\ |
| 230 | +// RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ |
| 231 | +// RUN: | FileCheck --check-prefix=CHECK-RV32-RELAX %s |
| 232 | +// CHECK-RV32-RELAX-NOT: "--no-relax" |
| 233 | + |
| 234 | +// Check that "--no-relax" is forwarded to the linker for RISC-V (Gnu.cpp). |
| 235 | +// RUN: env "PATH=" %clang -### %s -fuse-ld=ld -no-pie -mno-relax \ |
| 236 | +// RUN: --target=riscv32-unknown-linux-gnu --rtlib=platform --unwindlib=platform -mabi=ilp32 \ |
| 237 | +// RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ |
| 238 | +// RUN: --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \ |
| 239 | +// RUN: | FileCheck -check-prefix=CHECK-RV32-GNU-NORELAX %s |
| 240 | +// CHECK-RV32-GNU-NORELAX: "--no-relax" |
| 241 | + |
| 242 | +// Check that "--no-relax" is not forwarded to the linker for RISC-V (Gnu.cpp). |
| 243 | +// RUN: env "PATH=" %clang -### %s -fuse-ld=ld -no-pie \ |
| 244 | +// RUN: --target=riscv32-unknown-linux-gnu --rtlib=platform --unwindlib=platform -mabi=ilp32 \ |
| 245 | +// RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ |
| 246 | +// RUN: --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \ |
| 247 | +// RUN: | FileCheck -check-prefix=CHECK-RV32-GNU-RELAX %s |
| 248 | +// CHECK-RV32-GNU-RELAX-NOT: "--no-relax" |
| 249 | + |
218 | 250 | typedef __builtin_va_list va_list;
|
219 | 251 | typedef __SIZE_TYPE__ size_t;
|
220 | 252 | typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
|
0 commit comments