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

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: swift/CMakeLists.txt at de8322951cf4863acb69f489a6feaee20532215b · apple/swift · GitHub

I was unable to find an equivalent definition for LLVM.

Andrew Hyatt
andythehyatt@gmail.com

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@icloud.com

···

On Mar 26, 2016, at 10:44 AM, Andrew Hyatt via swift-dev <swift-dev@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

I was unable to find an equivalent definition for LLVM.

Andrew Hyatt
andythehyatt@gmail.com

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

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@gmail.com

···

On Mar 28, 2016, at 5:56 PM, Andrew Hyatt via swift-dev <swift-dev@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@icloud.com <mailto:ahyattdev@icloud.com>

On Mar 26, 2016, at 10:44 AM, Andrew Hyatt via swift-dev <swift-dev@swift.org <mailto:swift-dev@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

I was unable to find an equivalent definition for LLVM.

Andrew Hyatt
andythehyatt@gmail.com <mailto:andythehyatt@gmail.com>
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Has anyone tested the assorted install commands while cross compiling? Are they supposed to work?

Andrew Hyatt
ahyattdev@icloud.com

···

On Mar 30, 2016, at 5:43 PM, Andrew Hyatt <andythehyatt@gmail.com> wrote:

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@gmail.com <mailto:andythehyatt@gmail.com>

On Mar 28, 2016, at 5:56 PM, Andrew Hyatt via swift-dev <swift-dev@swift.org <mailto:swift-dev@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@icloud.com <mailto:ahyattdev@icloud.com>

On Mar 26, 2016, at 10:44 AM, Andrew Hyatt via swift-dev <swift-dev@swift.org <mailto:swift-dev@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

I was unable to find an equivalent definition for LLVM.

Andrew Hyatt
andythehyatt@gmail.com <mailto:andythehyatt@gmail.com>
_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev

_______________________________________________
swift-dev mailing list
swift-dev@swift.org <mailto:swift-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-dev