Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CFXMLInterface] Remove spurious include path. #5102

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

al45tair
Copy link
Contributor

The include path for libxml2 should be being set automatically by CMake because of the target_link_libraries() call; there is no need to add it explicitly.

Additionally, it's a really bad idea if you specify an absolute path...

rdar://137567628

The include path for libxml2 should be being set automatically by
CMake because of the `target_link_libraries()` call; there is no
need to add it explicitly.

Additionally, it's a really bad idea if you specify an absolute
path...

rdar://137567628
@al45tair
Copy link
Contributor Author

@swift-ci Please test linux platform

@al45tair
Copy link
Contributor Author

@swift-ci Please test Windows platform

@al45tair
Copy link
Contributor Author

al45tair commented Oct 11, 2024

Explanation: The explicit path in the include directories here causes the Swift Static SDK for Linux build to pick up the system copy of libxml2 instead of the one from the sysroot it's building. It shouldn't be necessary to list the path here anyway because target_link_libraries(... LibXml2::LibXml2) should pick up the proper path from the find_package(LibXml2) from the top level CMakeLists.txt.
Risk: Low. Fixes a build failure.
Original PR: #5101
Reviewed by: @jmschonfeld
Resolves: rdar://137567628
Tests: The PR tests should exercise the change to the build system. I have also tested building Swift main on Darwin with this change, and I've tested that it fixes the error when building the Static SDK for Linux.

@parkera parkera requested a review from jmschonfeld October 11, 2024 16:07
@parkera parkera merged commit 5ed4988 into swiftlang:release/6.0 Oct 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants