Skip to content

Commit abe529f

Browse files
committed
The package std module on an Apple cross target keeps the SDK on its command
1 parent 64997a9 commit abe529f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/build/prepare.cppm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10714,6 +10714,16 @@ prepare_build(bool print_fingerprint,
1071410714
// DWARF. Same function, not a second copy of the decision.
1071510715
for (auto& f : mcpp::toolchain::graph_runtime_compile_flags(*tc))
1071610716
flags += " " + f;
10717+
// AND THE APPLE CROSS TARGET'S SDK, WHICH THE TOOLCHAIN RESOLUTION
10718+
// HAD ALREADY PUT ON THIS CHANNEL AND THIS ASSIGNMENT REPLACES.
10719+
// The module's C library is the SDK's on the iOS rows (the
10720+
// package supplies the C++ layer alone), and without the sysroot
10721+
// the precompile stops on `mbstate_t` inside libc++'s own
10722+
// headers. Measured on macos-15 with `llvm.libcxx` over
10723+
// `arm64-apple-ios18.0`: twenty "reference to unresolved using
10724+
// declaration" errors, every one a C library type.
10725+
if (!tc->appleSdkRoot.empty())
10726+
flags += " -isysroot " + mcpp::xlings::shq(tc->appleSdkRoot.string());
1071710727
}
1071810728
// Everything up to here says which machine the module is for; what
1071910729
// follows says where its headers are. The codegen step needs only the

0 commit comments

Comments
 (0)