<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">First of all apologies for the niche question. As part of our older systems support on MacPorts, I am attempting a universal runtimes build of libcxx and libcxxabi using gcc8 as the initial build compiler. Currently I am using the llvm-7.1.0 tree for this.</div><div class=""><br class=""></div><div class="">The clang bootstrap compiler is to be built as native arch, then I would like to use that clang to make the universal runtimes.</div><div class=""><br class=""></div><div class="">We use the following initially to make sure that gcc8 builds the bootstrap compiler in the native arch:</div><div class=""><br class=""></div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">CMAKE_OSX_ARCHITECTURES=“x86_64”</span></font></div><div class=""><br class=""></div><div class="">This actually works just fine to generate libcxx/libcxxabi in the native arch, but try as I may, I cannot find a way to make libcxx and libcxxabi build as universal binaries using the bootstrap compiler.</div><div class=""><br class=""></div><div class="">I tried adding runtime targets:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DLLVM_ENABLE_RUNTIME_TARGETS="i386-apple-darwin10;x86_64-apple-darwin10”</span></div></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-family: Helvetica; font-size: 12px;" class="">or just forcing the CXXFLAGS and CCFLAGS to include “-arch i386 -arch x86_64” but no luck.</span></span></div><div class=""><br class=""></div><div class="">I was wondering if first of all building the runtimes as universal is supported (I know it is in compiler-rt) and if so, is there an approach or runtimes configuration option I am meant to set for this?</div><div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">Ken</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Our current configure line looks like this, with a bunch of MacPorts’ standard cmake defaults in there:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">cd "/opt/local/var/macports/build/_opt_myports_lang_libcxx/libcxx/work/build" && </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">CXX=g++-8.0 CC=gcc-8.0 </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">cmake -G "CodeBlocks - Unix Makefiles” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_BUILD_TYPE=Release </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_INSTALL_PREFIX="/opt/local” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_INSTALL_NAME_DIR="/opt/local/lib” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_C_COMPILER_LAUNCHER=/opt/local/bin/ccache </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_CXX_COMPILER_LAUNCHER=/opt/local/bin/ccache </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_C_COMPILER="$CC” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_CXX_COMPILER="$CXX” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_OBJC_COMPILER="$CC” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_OBJCXX_COMPILER="$CXX” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_POLICY_DEFAULT_CMP0025=NEW </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_POLICY_DEFAULT_CMP0060=NEW </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_VERBOSE_MAKEFILE=ON </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_COLOR_MAKEFILE=ON </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_FIND_FRAMEWORK=LAST </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_EXPORT_COMPILE_COMMANDS=ON </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_MAKE_PROGRAM=/usr/bin/make </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DCMAKE_INSTALL_RPATH="/opt/local/lib"</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DPYTHON_EXECUTABLE=/opt/local/libexec/libcxx-bootstrap/bin/python2.7 </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DLIBXML2_LIBRARIES=IGNORE </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">-DCMAKE_OSX_ARCHITECTURES="x86_64” </span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">-DCMAKE_OSX_DEPLOYMENT_TARGET="10.6” </span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">-DCMAKE_OSX_SYSROOT=“/“ </span></div><div class="">-DLLVM_TARGETS_TO_BUILD="X86” </div></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DLLVM_ENABLE_PROJECTS="clang” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi” </span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">/opt/local/var/macports/build/_opt_myports_lang_libcxx/libcxx/work/libcxx-7.1.0/llvm </div></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&& make install-cxx install-cxxabi</div></body></html>