mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 19:26:06 +00:00

Normally, passing -rtlib=platform overrides any earlier -rtlib options, and overrides any hardcoded CLANG_DEFAULT_RTLIB option. However, some targets, MSVC and Darwin, have custom logic for disallowing specific -rtlib= option values; amend these checks for allowing the -rtlib=platform option. Differential Revision: https://reviews.llvm.org/D132444
7 lines
556 B
C
7 lines
556 B
C
// RUN: %clang -target x86_64-apple-darwin -resource-dir=%S/Inputs/resource_dir --rtlib=compiler-rt -### %s 2>&1 | FileCheck %s -check-prefix DARWIN-COMPILER-RT
|
|
// RUN: %clang -target x86_64-apple-darwin -resource-dir=%S/Inputs/resource_dir --rtlib=platform -### %s 2>&1 | FileCheck %s -check-prefix DARWIN-COMPILER-RT
|
|
// RUN: not %clang %s -target x86_64-apple-darwin --rtlib=libgcc 2>&1 | FileCheck %s -check-prefix CHECK-ERROR
|
|
|
|
// DARWIN-COMPILER-RT: "{{.*}}clang_rt.osx{{.*}}"
|
|
// CHECK-ERROR: unsupported runtime library 'libgcc' for platform 'darwin'
|