Skip to content

Plumb native-clang-tools-path to build support. #81587

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

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

3405691582
Copy link
Member

The build support Python libraries assume by default that if we do not supply a Swift toolchain path, we can find clang in the installed toolchain path: i.e., the clang that we just built. However, possibly during bootstrap, we may not have a preexisting Swift compiler but still want to use the clang on the platform that is already installed.

build-script already gives us native-clang-tools-path. Here, we plumb this through to the relevant Python modules. If the native-clang-tools-path is not specified, we use the install_toolchain_path, just like native_toolchain_path, and the existing behavior is effectively unchanged. If we do specify a native-clang-tools-path, then we return it to ensure that we properly refer to the clang that lives there instead of always defaulting to the just-built clang.

The build support Python libraries assume by default that if we do not
supply a Swift toolchain path, we can find clang in the installed
toolchain path: i.e., the clang that we just built. However, possibly
during bootstrap, we may not have a preexisting Swift compiler but still
want to use the clang on the platform that is already installed.

build-script already gives us native-clang-tools-path. Here, we plumb
this through to the relevant Python modules. If the
native-clang-tools-path is not specified, we use the
install_toolchain_path, just like native_toolchain_path, and the
existing behavior is effectively unchanged. If we do specify a
native-clang-tools-path, then we return it to ensure that we properly
refer to the clang that lives there instead of always defaulting to the
just-built clang.
@3405691582
Copy link
Member Author

@swift-ci please test.

@3405691582
Copy link
Member Author

@swift-ci please test macOS platform.

@3405691582
Copy link
Member Author

@swift-ci please test Linux platform.

@3405691582
Copy link
Member Author

Ping.

1 similar comment
@3405691582
Copy link
Member Author

Ping.

@3405691582
Copy link
Member Author

@justice-adams-apple can you merge on my behalf? I don't have permissions. Thank you!

@justice-adams-apple justice-adams-apple merged commit 1cf426c into swiftlang:main Jun 30, 2025
5 checks passed
susmonteiro pushed a commit to susmonteiro/swift that referenced this pull request Jul 2, 2025
The build support Python libraries assume by default that if we do not
supply a Swift toolchain path, we can find clang in the installed
toolchain path: i.e., the clang that we just built. However, possibly
during bootstrap, we may not have a preexisting Swift compiler but still
want to use the clang on the platform that is already installed.

build-script already gives us native-clang-tools-path. Here, we plumb
this through to the relevant Python modules. If the
native-clang-tools-path is not specified, we use the
install_toolchain_path, just like native_toolchain_path, and the
existing behavior is effectively unchanged. If we do specify a
native-clang-tools-path, then we return it to ensure that we properly
refer to the clang that lives there instead of always defaulting to the
just-built clang.
3405691582 added a commit to 3405691582/swift that referenced this pull request Jul 3, 2025
The build support Python libraries assume by default that if we do not
supply a Swift toolchain path, we can find clang in the installed
toolchain path: i.e., the clang that we just built. However, possibly
during bootstrap, we may not have a preexisting Swift compiler but still
want to use the clang on the platform that is already installed.

build-script already gives us native-clang-tools-path. Here, we plumb
this through to the relevant Python modules. If the
native-clang-tools-path is not specified, we use the
install_toolchain_path, just like native_toolchain_path, and the
existing behavior is effectively unchanged. If we do specify a
native-clang-tools-path, then we return it to ensure that we properly
refer to the clang that lives there instead of always defaulting to the
just-built clang.
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.

2 participants