Closed al45tair closed 1 week ago
Do we also need to do the same for all of the dependencies (swift-foundation, swift-foundation-icu, and swift-collections)?
👍 Yes, ideally, anything that is installed as a .so
or that produces an executable on Linux would have --build-id=sha1
as a linker option, so that we get build IDs on everything (like we have on Apple platforms by default). It isn't necessary for static libraries.
I'm seeing some build failures that appear to be new with this change:
(.data.rel.ro+0x330): error: undefined reference to '$s22_FoundationCollections4RopeV8_StorageCMn'
/home/build-user/build/buildbot_linux/none-swift_package_sandbox_linux-x86_64/usr/lib/swift_static/linux/libFoundationEssentials.a(AttributedString+_InternalRuns.swift.o)(.data.rel.ro+0x338): error: undefined reference to '$s22_FoundationCollections4RopeV5_NodeVMn'
This symbol should be exported from lib_FoundationCollections.a
which is auto linked from libFoundationEssentials.a
:
target_compile_options(FoundationEssentials PRIVATE
"SHELL:$<$<COMPILE_LANGUAGE:Swift>:-Xfrontend -public-autolink-library -Xfrontend _FoundationCollections>")
Is it possible that this change introduced that issue?
Oh I apologize, that was due to an issue on my end. New test run kicked off at https://ci.swift.org/job/swift-PR-Linux/16085/
Ok the new linux test passed so this looks good to me, thanks!
We should use build IDs on Linux so that we can identify the built artefacts, and also so that we can match them up with debug information should we choose to separate it.
rdar://130582768