This is an archive of the discontinued LLVM Phabricator instance.

[debugserver] Detect arch from LLVM_DEFAULT_TARGET_TRIPLE
ClosedPublic

Authored by vsk on Oct 28 2019, 12:07 PM.

Details

Summary

The debugserver build needs to conditionally include files depending on the
target architecture.

Switch on the architecture specified by LLVM_DEFAULT_TARGET_TRIPLE, as
the llvm and swift build systems use this variable to identify the
target (the latter, indirectly, through LLVM_HOST_TRIPLE).

It would be possible to switch on CMAKE_OSX_ARCHITECTURES, but the swift
build does not provide it, preferring instead to pass arch-specific
CFLAGS etc explicitly. Switching on LLVM_HOST_TRIPLE is also an option,
but it breaks down when cross-compiling.

Diff Detail

Event Timeline

vsk created this revision.Oct 28 2019, 12:07 PM
davide accepted this revision.Oct 28 2019, 3:16 PM

LGTM

This revision is now accepted and ready to land.Oct 28 2019, 3:16 PM
vsk closed this revision.Oct 28 2019, 5:18 PM

Landed in 82d3ba.