mirror of
https://github.com/boostorg/build.git
synced 2026-01-19 04:02:14 +00:00
Add Linux arm & x86 clang cross compile defs.
This commit is contained in:
20
.ci/azp-linux-extra.yml
Normal file
20
.ci/azp-linux-extra.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
steps:
|
||||
- bash: |
|
||||
set -e
|
||||
uname -a
|
||||
./.ci/linux-cxx-install.sh
|
||||
displayName: Install
|
||||
- bash: |
|
||||
set -e
|
||||
./bootstrap.sh ${TOOLSET}
|
||||
./b2 --prefix=$HOME/temp/.b2 install toolset=${TOOLSET}
|
||||
rm ./b2
|
||||
export PATH=$HOME/temp/.b2/bin:$PATH
|
||||
cd $HOME
|
||||
touch build.jam
|
||||
b2 -v
|
||||
b2 -n --debug-configuration toolset=${TOOLSET}
|
||||
displayName: Bootstrap
|
||||
- { bash: "./.ci/b2_example.sh example/hello", displayName: "example/hello" }
|
||||
- { bash: "./.ci/b2_example.sh example/libraries", displayName: "example/libraries" }
|
||||
- { bash: "./.ci/b2_example.sh example/make", displayName: "example/make" }
|
||||
@@ -142,6 +142,22 @@ stages:
|
||||
steps:
|
||||
- template: .ci/azp-macos-extra.yml
|
||||
|
||||
- job: 'Linux'
|
||||
strategy:
|
||||
matrix:
|
||||
Clang ${{variables.clang_latest}} x86/64: {
|
||||
B2_ARGS: "architecture=x86 address-model=64",
|
||||
TOOLSET: "clang-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}",
|
||||
LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: "${{variables.clang_latest}}", VM_IMAGE: "${{variables.linux_latest_vm}}"}
|
||||
Clang ${{variables.clang_latest}} x86/32: {
|
||||
B2_ARGS: "architecture=x86 address-model=32",
|
||||
TOOLSET: "clang-${{variables.clang_latest}}", PACKAGES: "clang-${{variables.clang_latest}}",
|
||||
LLVM_OS: "${{variables.linux_latest_os}}", LLVM_VER: "${{variables.clang_latest}}", VM_IMAGE: "${{variables.linux_latest_vm}}"}
|
||||
pool:
|
||||
vmImage: $(VM_IMAGE)
|
||||
steps:
|
||||
- template: .ci/azp-linux-extra.yml
|
||||
|
||||
- stage: Website_Update
|
||||
dependsOn: [Core, Extra]
|
||||
displayName: 'Website Update'
|
||||
|
||||
@@ -67,34 +67,43 @@ rule init-cxxstd-flags ( toolset : condition * : version )
|
||||
cxxstd-flags $(toolset) : $(condition)/<cxxstd>latest/<cxxstd-dialect>$(dialects) : -std=c++$(std) ;
|
||||
}
|
||||
|
||||
local rule init-flags-cross ( toolset : condition * : architecture address-model target-os )
|
||||
local rule init-flags-cross ( toolset : condition * : architecture + : address-model + : target-os )
|
||||
{
|
||||
local arch ;
|
||||
local vendor ;
|
||||
local sys ;
|
||||
switch $(architecture)-$(address-model)
|
||||
{
|
||||
case arm-64 : arch = arm64 ;
|
||||
case arm-32 : arch = arm ;
|
||||
case x86-64 : arch = x86_64 ;
|
||||
case x86-32 : arch = i386 ;
|
||||
}
|
||||
local vendor = unknown ;
|
||||
local sys = unknown ;
|
||||
switch $(target-os)
|
||||
{
|
||||
case darwin : vendor = apple ; sys = darwin ;
|
||||
case linux : vendor = pc ; sys = linux ;
|
||||
}
|
||||
local vendor-sys = $(vendor)-$(sys) ;
|
||||
for local _architecture_ in $(architecture)
|
||||
{
|
||||
for local _address-model_ in $(address-model)
|
||||
{
|
||||
local arch = unknown ;
|
||||
switch $(_architecture_)-$(_address-model_)
|
||||
{
|
||||
case arm-64 : arch = arm64 ;
|
||||
case arm-32 : arch = arm ;
|
||||
case x86-64 : arch = x86_64 ;
|
||||
case x86-32 : arch = i386 ;
|
||||
}
|
||||
|
||||
toolset.flags $(toolset)
|
||||
OPTIONS $(condition)/<target-os>$(target-os)/<architecture>$(_architecture_)/<address-model>$(_address-model_)
|
||||
: "--target=$(arch)-$(vendor-sys)"
|
||||
: unchecked ;
|
||||
}
|
||||
}
|
||||
toolset.flags $(toolset)
|
||||
OPTIONS $(condition)/<target-os>$(target-os)/<architecture>$(architecture)/<address-model>$(address-model)
|
||||
: "--target=$(arch)-$(vendor)-$(sys)"
|
||||
: unchecked ;
|
||||
}
|
||||
|
||||
rule init-flags ( toolset : condition * : version )
|
||||
{
|
||||
init-cxxstd-flags $(toolset) : $(condition) : $(version) ;
|
||||
|
||||
init-flags-cross $(toolset) : $(condition) : arm 64 darwin ;
|
||||
init-flags-cross $(toolset) : $(condition) : x86 64 darwin ;
|
||||
init-flags-cross $(toolset) : $(condition) : arm x86 : 64 : darwin ;
|
||||
init-flags-cross $(toolset) : $(condition) : arm x86 : 64 32 : linux ;
|
||||
|
||||
# This is a remporary solution for doing combined architecture builds on macOS.
|
||||
toolset.flags $(toolset)
|
||||
|
||||
Reference in New Issue
Block a user