Skip to content

[build] SR-11880 skip building compiler-rt with --xcode #28517

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

ixrevo
Copy link
Contributor

@ixrevo ixrevo commented Dec 1, 2019

After merging #28341 ./utils/build-script build the compiler-rt even with --xcode parameter, which breaks a build. This PR resolves this issue by skipping compiler-rt in cases when it is not supported (build with Xcode generator and/or cross-compiling).

Resolves https://bugs.swift.org/browse/SR-11880.

@shahmishal

@swift-ci Please test

@ixrevo
Copy link
Contributor Author

ixrevo commented Dec 2, 2019

@swift-ci Please smoke test

@CodaFi
Copy link
Contributor

CodaFi commented Dec 2, 2019

This seems like an answer to fix the xcode build, but I’m more curious as to a root cause for VALID_ARCH not containing Haswell on the compiler-rt side. I think @danliew-apple was fighting the CMake there last. Any ideas?

@CodaFi
Copy link
Contributor

CodaFi commented Dec 2, 2019

@swift-ci please smoke test

@ixrevo
Copy link
Contributor Author

ixrevo commented Dec 2, 2019

Hi, @CodaFi! Unfortunately, I'm not competent enough to answer your question, but a quick search in the repo gave me this https://github.com/apple/llvm-project/blob/5b4cbf67ff36f82ab95551e8a5e51b8b0b7bfce2/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake#L136

  # The simple program will build for x86_64h on the simulator because it is 
  # compatible with x86_64 libraries (mostly), but since x86_64h isn't actually
  # a valid or useful architecture for the iOS simulator we should drop it.
  if(${os} MATCHES "^(iossim|tvossim|watchossim)$")
    list(REMOVE_ITEM archs "x86_64h")
  endif()

@CodaFi
Copy link
Contributor

CodaFi commented Dec 2, 2019

Hm, makes sense.

Either way, this LGTM. Thank you so so much for unblocking the Xcode build. It’s a huge gateway to getting more external contributors.

⛵️

@CodaFi CodaFi merged commit 267c4be into swiftlang:master Dec 2, 2019
@CodaFi
Copy link
Contributor

CodaFi commented Dec 2, 2019

Please be sure to update the SR.

@ixrevo ixrevo deleted the SR-11880_skip-building-compiler-rt-with-xcode branch December 2, 2019 16:52
@danliew-apple
Copy link
Contributor

I think @danliew-apple was fighting the CMake there last. Any ideas?

Last time I looked the Xcode build of Compiler-rt was very broken. It seemed like a bug in CMake where the generated build rules didn't work correctly. I gave up in the end.

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