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

[6.0] Add swift-corelibs-foundation Linux/Android workaround #7641

Closed
wants to merge 5 commits into from

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Jun 6, 2024

Cherry-pick of #7425
Explanation: CoreFoundation depends on dispatch, this dependency is implicit and dispatch itself is bundled with swift toolchains. Let's add a package specific workaround for Linux/Android targets to add toolchain resources directory to search paths of clang build targets.
Scope: Isolated to Android and Linux support in llbuild code.
Risk: Low, change was on main for more than 2 months now.
Testing: Automated with a new test case: testSwiftCorelibsFoundationIncludeWorkaround.
Issue: Prerequisite for rdar://127369576
Reviewer: @MaxDesiatov

xedin added 4 commits June 6, 2024 15:46
We need this information to set `-w` and other package specific options.

(cherry picked from commit c86ea69)
CoreFoundation depends on dispatch, this dependency is implicit
and dispatch itself is bundled with swift toolchains. Let's add
a package specific workaround for Linux/Android targets to add
toolchain resources directory to search paths of clang build targets.

(cherry picked from commit 0871a04)

# Conflicts:
#	Sources/Build/BuildDescription/ClangTargetBuildDescription.swift
(cherry picked from commit d6cfaeb)

# Conflicts:
#	Tests/BuildTests/ClangTargetBuildDescriptionTests.swift
(cherry picked from commit a85039c)

# Conflicts:
#	Sources/SPMTestSupport/MockBuildTestHelper.swift
@MaxDesiatov MaxDesiatov requested a review from a team as a code owner June 6, 2024 14:55
@MaxDesiatov MaxDesiatov added linux build system Changes to interactions with build systems Android labels Jun 6, 2024
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov changed the title Maxd/6.0 include corelibs foundation [6.0] Add swift-corelibs-foundation Linux/Android-specific workaround Jun 6, 2024
@MaxDesiatov MaxDesiatov added the swift 6.0 Related to Swift 6.0 release branch label Jun 6, 2024
@MaxDesiatov MaxDesiatov changed the title [6.0] Add swift-corelibs-foundation Linux/Android-specific workaround [6.0] Add swift-corelibs-foundation Linux/Androidworkaround Jun 6, 2024
@MaxDesiatov MaxDesiatov changed the title [6.0] Add swift-corelibs-foundation Linux/Androidworkaround [6.0] Add swift-corelibs-foundation Linux/Android workaround Jun 6, 2024
MaxDesiatov added a commit that referenced this pull request Jun 6, 2024
This test should be cherry-picked in #7641 and initially ended up in this cherry-pick PR by mistake.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@bnbarham is it worth resolving conflicts here, or are we keeping it in main only for now and this should be closed?

@bnbarham
Copy link
Contributor

It turns out that sourcekit-lsp also needs basically this exact thing (https://github.com/apple/sourcekit-lsp/blob/main/CONTRIBUTING.md#linux), so we really do need something more generic here. Let's just keep it on main for now.

@MaxDesiatov MaxDesiatov deleted the maxd/6.0-include-corelibs-foundation branch June 14, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android build system Changes to interactions with build systems linux swift 6.0 Related to Swift 6.0 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants