Skip to content

[test][IRGen] Split windows autolink checks into a separate file #69062

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

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Oct 9, 2023

Since it can construct invalid target triples like wasm32-unknown-windows-msvc, which can hit internal compiler crash in llvm. So split into a separate file to run the test only on archs windows supports.

@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@kateinoigakukun kateinoigakukun force-pushed the pr-a39e58fabceb9ae04771f25d642349f6708a8336 branch from f6c30a1 to bc4ce55 Compare October 9, 2023 15:43
@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@kateinoigakukun kateinoigakukun changed the title [test][IRGen] Avoid using %target-cpu in -target value @kateinoigakukun [test][IRGen] Split windows autolink checks into a separate file Oct 9, 2023
@kateinoigakukun kateinoigakukun changed the title @kateinoigakukun [test][IRGen] Split windows autolink checks into a separate file [test][IRGen] Split windows autolink checks into a separate file Oct 9, 2023
@MaxDesiatov MaxDesiatov added test suite Area: test suite IRGen LLVM IR generation labels Oct 9, 2023
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain how the invalid triples are formed? I don't immediately see how that would happen.

@kateinoigakukun
Copy link
Member Author

@compnerd The invalid triple can be formed when running test/IRGen suite on a build dir which is configured for cross compiling (especially I'm cross compiling for wasm32 on linux/macos)

@kateinoigakukun kateinoigakukun marked this pull request as ready for review October 9, 2023 18:32
Since it can construct invalid target triples like
wasm32-unknown-windows-msvc, which can hit internal compiler crash in
llvm. So split into a separate file to run the test only on archs
windows supports.
@kateinoigakukun kateinoigakukun force-pushed the pr-a39e58fabceb9ae04771f25d642349f6708a8336 branch from bc4ce55 to 4ab3620 Compare October 9, 2023 18:33
@kateinoigakukun
Copy link
Member Author

@swift-ci Please smoke test

@MaxDesiatov MaxDesiatov requested a review from etcwilde October 9, 2023 18:54
@MaxDesiatov
Copy link
Contributor

@swift-ci test macos

@al45tair
Copy link
Contributor

Can you explain how the invalid triples are formed? I don't immediately see how that would happen.

Presumably it's this:

// RUN: %target-swift-frontend -target %target-cpu-unknown-windows-msvc

since when building for WASM presumably %target-cpu is wasm32.

@kateinoigakukun
Copy link
Member Author

@compnerd Let me know if you still have any concern about merging this 🙏

@MaxDesiatov MaxDesiatov requested a review from compnerd October 10, 2023 17:20
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah, I missed the %target-cpu-unknown-windows-msvc.

@kateinoigakukun kateinoigakukun merged commit bf45c55 into swiftlang:main Oct 10, 2023
@kateinoigakukun kateinoigakukun deleted the pr-a39e58fabceb9ae04771f25d642349f6708a8336 branch October 10, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IRGen LLVM IR generation test suite Area: test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants