Skip to content

Commit dbe7c13

Browse files
committed
Unversioned clang resource OS name
The clang resource directory generally does not use a versioned form of the platform name. This aligns the old driver behavior with the new driver for FreeBSD support. https://github.com/swiftlang/swift-driver/blob/a7f32bd005de1b998495ddc052bf78fc3cebdaa5/Sources/SwiftDriver/Jobs/GenericUnixToolchain%2BLinkerSupport.swift#L309
1 parent 705b1a6 commit dbe7c13

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/Driver/UnixToolChains.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,9 @@ toolchains::GenericUnix::constructInvocation(const DynamicLinkJobAction &job,
334334
SmallString<128> LibProfile(SharedResourceDirPath);
335335
llvm::sys::path::remove_filename(LibProfile); // remove platform name
336336
llvm::sys::path::append(LibProfile, "clang", "lib");
337-
338-
llvm::sys::path::append(LibProfile, getTriple().getOSName(),
339-
Twine("libclang_rt.profile-") +
340-
getTriple().getArchName() + ".a");
337+
llvm::sys::path::append(
338+
LibProfile, getUnversionedTriple(getTriple()).getOSName(),
339+
Twine("libclang_rt.profile-") + getTriple().getArchName() + ".a");
341340
Arguments.push_back(context.Args.MakeArgString(LibProfile));
342341
Arguments.push_back(context.Args.MakeArgString(
343342
Twine("-u", llvm::getInstrProfRuntimeHookVarName())));

0 commit comments

Comments
 (0)