[swift-dev] The build system is ignoring swift-install-components when cross compiling

Andrew Hyatt andythehyatt at gmail.com
Wed Mar 30 19:43:44 CDT 2016


It appears as though the --install-swift flag is intended to make build-script-impl install swift. However, it fails with this: 

/usr/local/bin/cmake --build /Users/andyhyatt/src/swift-fixed/build/Ninja-Debug/swift-macosx-x86_64 -- install
ninja: error: unknown target ‘install'

This is strange, because similar commands like --install-lldb function without error. 

Another quirk is that swift-macosx-x86_64 is the folder it is running the install scripts of, but I am cross compiling for armv7s. 

Is there a better way to export the compiled tools for install when cross compiling than what I am doing?

Andrew Hyatt
andythehyatt at gmail.com

> On Mar 28, 2016, at 5:56 PM, Andrew Hyatt via swift-dev <swift-dev at swift.org> wrote:
> 
> It is worth noting that I am cross compiling on Mac OS X 10.11.3 x86_64, and compiling for an armv7s Darwin 15.0.0 platform. 
> 
> Andrew Hyatt
> ahyattdev at icloud.com <mailto:ahyattdev at icloud.com>
> 
> On Mar 26, 2016, at 10:44 AM, Andrew Hyatt via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
> 
>> swift-dev,
>> 
>> The build system is ignoring swift-install-components when cross compiling. 
>> 
>> The llvm-install-components are copied over cleanly, but the swift-install-components are ignored. 
>> 
>> An additional issue is that it still puts the products in the toolchain directory and ignores the specified prefix, despite a blank toolchain prefix being specified. 
>> 
>> The expected layout of install-destdir: /usr/local/ *everything from llvm-install-components and swift-install-components*
>> 
>> Actual layout: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/  *everything from llvm-install-components*
>> 
>> My build command:
>> 
>> utils/build-script -i --no-assertions -- \
>> --cross-compile-tools-deployment-targets "iphoneos-armv7s” \
>> --user-config-args="-DLLVM_ENABLE_BACKTRACES=Off -DSWIFT_BUILD_SOURCEKIT=FALSE” \
>> --install-destdir=/Users/andyhyatt/src/inst --install-prefix=/usr/local/ \
>> --swift-install-components "compiler;stdlib;clang-builtin-headers” \
>> --llvm-install-components "clang;libclang;libclang-headers” \
>> --toolchain-prefix=“/"
>> 
>> Also, is there any way to get a list of valid components for llvm-install-components? 
>> 
>> There is a CMake variable called _SWIFT_KNOWN_INSTALL_COMPONENTS that is defined here: https://github.com/apple/swift/blob/de8322951cf4863acb69f489a6feaee20532215b/CMakeLists.txt#L85 <https://github.com/apple/swift/blob/de8322951cf4863acb69f489a6feaee20532215b/CMakeLists.txt#L85>
>> 
>> I was unable to find an equivalent definition for LLVM. 
>> 
>> Andrew Hyatt
>> andythehyatt at gmail.com <mailto:andythehyatt at gmail.com>
>> _______________________________________________
>> swift-dev mailing list
>> swift-dev at swift.org <mailto:swift-dev at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-dev <https://lists.swift.org/mailman/listinfo/swift-dev>
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160330/8586e760/attachment.html>


More information about the swift-dev mailing list