This is an archive of the discontinued LLVM Phabricator instance.

build: always add support for assembly targets on Darwin
ClosedPublic

Authored by compnerd on Jul 22 2020, 8:59 AM.

Details

Summary

When attempting to build compiler-rt on a developer transition kit, the
build would fail due to .S files not being handled properly by the
Ninja generator. Rather than conditionalising on Xcode, conditionalise
to Darwin. Because we know that the system compiler is clang based, it
will always properly handle the pre-processing based on the extension.

Diff Detail

Event Timeline

compnerd created this revision.Jul 22 2020, 8:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2020, 8:59 AM
Herald added subscribers: Restricted Project, mgorny. · View Herald Transcript
davide accepted this revision.Jul 22 2020, 2:57 PM
This revision is now accepted and ready to land.Jul 22 2020, 2:57 PM
This revision was automatically updated to reflect the committed changes.

Hi @compnerd, it looks like this fails to link: http://green.lab.llvm.org/green/job/clang-stage1-RA/13171/console

Undefined symbols for architecture arm64:
  "_wrap__setjmp", referenced from:
      substitution__setjmp in tsan_interceptors_posix.cpp.o
  "_wrap_setjmp", referenced from:
      substitution_setjmp in tsan_interceptors_posix.cpp.o
  "_wrap_sigsetjmp", referenced from:
      substitution_sigsetjmp in tsan_interceptors_posix.cpp.o
ld: symbol(s) not found for architecture arm64

I'm thinking the warnings above are part of the issue:

ld: warning: ignoring file lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_rtl_amd64.S.o, building for iOS-arm64 but attempting to link with file built for iOS Simulator-x86_64ld: warning: ignoring file lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_rtl_aarch64.S.o, building for iOS-arm64 but attempting to link with file built for iOS Simulator-x86_64