mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 15:41:46 +00:00
1971823ecb
When the target triple was an Apple platform `ToolChain::getOSLibName()` (called by `getCompilerRTPath()`) would return the full OS name including the version number (e.g. `darwin20.3.0`). This is not correct because the library directory for all Apple platforms is `darwin`. This in turn caused * `-print-runtime-dir` to return a non-existant path. * `-print-file-name=<any compiler-rt library>` to return the filename instead of the full path to the library. Two regression tests are included. rdar://77417317 Differential Revision: https://reviews.llvm.org/D101682
25 lines
1.1 KiB
C
25 lines
1.1 KiB
C
// Regression test. Previously the output returned the full OS name
|
|
// (e.g. `darwin20.3.0`) instead of just `darwin`.
|
|
|
|
// RUN: %clang -print-runtime-dir --target=x86_64-apple-darwin20.3.0 \
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir \
|
|
// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
|
|
|
|
// RUN: %clang -print-runtime-dir --target=x86_64-apple-macosx11.0.0 \
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir \
|
|
// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
|
|
|
|
// RUN: %clang -print-runtime-dir --target=arm64-apple-ios14.0.0 \
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir \
|
|
// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
|
|
|
|
// RUN: %clang -print-runtime-dir --target=arm64-apple-tvos14.0.0 \
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir \
|
|
// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
|
|
|
|
// RUN: %clang -print-runtime-dir --target=arm64-apple-watchos5.0.0 \
|
|
// RUN: -resource-dir=%S/Inputs/resource_dir \
|
|
// RUN: | FileCheck --check-prefix=PRINT-RUNTIME-DIR %s
|
|
|
|
// PRINT-RUNTIME-DIR: lib{{/|\\}}darwin{{$}}
|