This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Support building Fuchsia toolchain on Darwin
ClosedPublic

Authored by phosek on Mar 14 2017, 3:33 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Mar 14 2017, 3:33 PM
phosek added inline comments.Mar 14 2017, 3:38 PM
cmake/caches/Fuchsia.cmake
3 ↗(On Diff #91785)

This is only needed because the first stage compiler is building host builtins which on Darwin require extra architecture support. I don't know if there is a way to disable this behavior? One option I can think of would be to set LLVM_BUILTIN_TARGETS to "". Alternative would be to add a new CMake option, e.g. LLVM_INCLUDE_RUNTIMES.

phosek added inline comments.Mar 16 2017, 3:17 PM
cmake/caches/Fuchsia.cmake
3 ↗(On Diff #91785)

I've implemented that option in D31060.

phosek marked 2 inline comments as done.Mar 17 2017, 3:13 PM
phosek added inline comments.
cmake/caches/Fuchsia.cmake
3 ↗(On Diff #91785)

Turned out this is not going to work since the runtimes build is apparently needed by the second stage compiler.

beanz added inline comments.Mar 21 2017, 3:56 PM
cmake/caches/Fuchsia.cmake
3 ↗(On Diff #91785)

You can disable the embedded builtins by turning off COMPILER_RT_ENABLE_IOS. There are corresponding WATCHOS and TVOS options that you might want to hit off as well. They default off, but defaults do change sometimes.

phosek updated this revision to Diff 92591.Mar 21 2017, 8:26 PM
phosek marked 3 inline comments as done.

Thanks, this is exactly what I was looking for!

beanz accepted this revision.Mar 22 2017, 1:29 PM

Looks great!

This revision is now accepted and ready to land.Mar 22 2017, 1:29 PM
This revision was automatically updated to reflect the committed changes.