Skip to content

Commit 0009aa7

Browse files
committed
[darwin][driver] link to a separate simulator builtin library
This lets us link to a simulator builtins library with an arm64 slice, that's distinct from the device builtins library slice
1 parent 99855ff commit 0009aa7

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

clang/lib/Driver/ToolChains/Darwin.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,10 +1078,9 @@ void MachO::AddLinkRuntimeLib(const ArgList &Args, ArgStringList &CmdArgs,
10781078
DarwinLibName += Component;
10791079
if (!(Opts & RLO_IsEmbedded))
10801080
DarwinLibName += "_";
1081-
DarwinLibName += getOSLibraryNameSuffix();
1082-
} else
1083-
DarwinLibName += getOSLibraryNameSuffix(true);
1081+
}
10841082

1083+
DarwinLibName += getOSLibraryNameSuffix();
10851084
DarwinLibName += IsShared ? "_dynamic.dylib" : ".a";
10861085
SmallString<128> Dir(getDriver().ResourceDir);
10871086
llvm::sys::path::append(

clang/test/Driver/Inputs/resource_dir/lib/darwin/libclang_rt.iossim.a

Whitespace-only changes.

clang/test/Driver/darwin-ld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
// RUN: FileCheck -check-prefix=LINK_IOSSIM_PROFILE %s < %t.log
164164
// LINK_IOSSIM_PROFILE: {{ld(.exe)?"}}
165165
// LINK_IOSSIM_PROFILE: libclang_rt.profile_iossim.a
166-
// LINK_IOSSIM_PROFILE: libclang_rt.ios.a
166+
// LINK_IOSSIM_PROFILE: libclang_rt.iossim.a
167167

168168
// RUN: %clang -target x86_64-apple-ios13-macabi -mlinker-version=400 -fprofile-instr-generate -### %t.o 2> %t.log
169169
// RUN: FileCheck -check-prefix=LINK_MACABI_PROFILE %s < %t.log

0 commit comments

Comments
 (0)