This is an archive of the discontinued LLVM Phabricator instance.

[CMake] [Darwin] Support building the macho_embedded builtin libraries.
ClosedPublic

Authored by beanz on Sep 28 2015, 2:15 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

beanz updated this revision to Diff 35908.Sep 28 2015, 2:15 PM
beanz retitled this revision from to [CMake] [Darwin] Support building the macho_embedded builtin libraries..
beanz updated this object.
beanz added reviewers: bogner, samsonov, bob.wilson.
beanz added a subscriber: llvm-commits.
samsonov added inline comments.Sep 29 2015, 3:30 PM
cmake/Modules/CompilerRTDarwinUtils.cmake
306 ↗(On Diff #35908)

Please make sure these changes will not leak out of this macro and affect further compilations.

361 ↗(On Diff #35908)

Ugh. It's better to provide a different global variable for macho_embedded libraries, relative to COMPILER_RT_OUTPUT_DIR.

cmake/config-ix.cmake
395 ↗(On Diff #35908)

Just move these declarations to darwin_add_embedded_builtin_libraries: you already hardcode a lot of archs/flags etc. there.

beanz updated this revision to Diff 36045.Sep 29 2015, 3:55 PM

Updates based on feedback from samsonov.

  • Changed darwin_add_embedded_builtin_libraries to a function
  • Created a setting for DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
  • Moved macho_embedded archs and sysroot settings into the function
  • Also fixed an issue with sysroot specification -- we should be setting an ios sysroot for arm architectures
samsonov accepted this revision.Sep 29 2015, 4:12 PM
samsonov edited edge metadata.

LGTM. It's probably out of the scope of the patch, but: do you set the correct dependencies that would ensure re-building of Apple builtins/macho_embedded runtimes whenever exlcudes/includes files are updated?

This revision is now accepted and ready to land.Sep 29 2015, 4:12 PM
beanz added a comment.Sep 29 2015, 4:15 PM

Not yet, but I have a patch to fix that which I will commit after this one.

This revision was automatically updated to reflect the committed changes.