Skip to content

Commit

Permalink
Add arm64 nodeps chip-tool + chip-all-clusters-app build (#20443)
Browse files Browse the repository at this point in the history
And switch to clang which also removes the need for shared libstdc++.
  • Loading branch information
mspang authored and pull[bot] committed Aug 29, 2022
1 parent 15452d8 commit 2271672
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ def HostTargets():
app_targets.append(target.Extend('tv-casting-app', app=HostApp.TV_CASTING))
app_targets.append(target.Extend('bridge', app=HostApp.BRIDGE))

nodeps_args = dict(enable_ble=False, enable_wifi=False, enable_thread=False, use_clang=True)
app_targets.append(target.Extend('chip-tool-nodeps', app=HostApp.CHIP_TOOL, **nodeps_args))
app_targets.append(target.Extend('all-clusters-app-nodeps', app=HostApp.ALL_CLUSTERS, **nodeps_args))

builder = VariantBuilder()

# Possible build variants. Note that number of potential
Expand Down Expand Up @@ -300,10 +304,6 @@ def HostTargets():
yield target_native.Extend('address-resolve-tool-platform-mdns-ipv6only', app=HostApp.ADDRESS_RESOLVE,
use_platform_mdns=True, enable_ipv4=False).GlobBlacklist("Reduce default build variants")

nodeps_args = dict(enable_ipv4=False, enable_ble=False, enable_wifi=False, enable_thread=False)
yield target_native.Extend('chip-tool-nodeps', app=HostApp.CHIP_TOOL, **nodeps_args)
yield target_native.Extend('all-clusters-app-nodeps', app=HostApp.ALL_CLUSTERS, **nodeps_args)

test_target = Target(HostBoard.NATIVE.PlatformName(), HostBuilder)
yield test_target.Extend(HostBoard.NATIVE.BoardName() + '-tests', board=HostBoard.NATIVE, app=HostApp.TESTS)
yield test_target.Extend(HostBoard.NATIVE.BoardName() + '-tests-clang', board=HostBoard.NATIVE, app=HostApp.TESTS, use_clang=True)
Expand Down
48 changes: 46 additions & 2 deletions scripts/build/testdata/build_linux_on_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters'

# Generating linux-arm64-all-clusters-app-nodeps
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters-app-nodeps'

# Generating linux-arm64-all-clusters-app-nodeps-ipv6only
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-all-clusters-app-nodeps-ipv6only'

# Generating linux-arm64-all-clusters-ipv6only
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
Expand Down Expand Up @@ -41,6 +51,16 @@ bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-ipv6only'

# Generating linux-arm64-chip-tool-nodeps
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-nodeps'

# Generating linux-arm64-chip-tool-nodeps-ipv6only
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '"'"'--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true target_cpu="arm64" is_clang=true chip_crypto="mbedtls" sysroot="SYSROOT_AARCH64"'"'"' {out}/linux-arm64-chip-tool-nodeps-ipv6only'

# Generating linux-arm64-light
bash -c '
PKG_CONFIG_PATH="SYSROOT_AARCH64/lib/aarch64-linux-gnu/pkgconfig" \
Expand Down Expand Up @@ -156,7 +176,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root} {ou
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux {out}/linux-x64-all-clusters

# Generating linux-x64-all-clusters-app-nodeps
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false' {out}/linux-x64-all-clusters-app-nodeps
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-all-clusters-app-nodeps

# Generating linux-x64-all-clusters-app-nodeps-ipv6only
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-all-clusters-app-nodeps-ipv6only

# Generating linux-x64-all-clusters-ipv6only
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/all-clusters-app/linux --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-all-clusters-ipv6only
Expand All @@ -183,7 +206,10 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool --args=chip_inet_config_enable_ipv4=false {out}/linux-x64-chip-tool-ipv6only

# Generating linux-x64-chip-tool-nodeps
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false' {out}/linux-x64-chip-tool-nodeps
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-chip-tool-nodeps

# Generating linux-x64-chip-tool-nodeps-ipv6only
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/chip-tool '--args=chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=false chip_enable_wifi=false chip_enable_openthread=false is_clang=true' {out}/linux-x64-chip-tool-nodeps-ipv6only

# Generating linux-x64-light
gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux {out}/linux-x64-light
Expand Down Expand Up @@ -263,6 +289,12 @@ gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/exa
# Building linux-arm64-all-clusters
ninja -C {out}/linux-arm64-all-clusters

# Building linux-arm64-all-clusters-app-nodeps
ninja -C {out}/linux-arm64-all-clusters-app-nodeps

# Building linux-arm64-all-clusters-app-nodeps-ipv6only
ninja -C {out}/linux-arm64-all-clusters-app-nodeps-ipv6only

# Building linux-arm64-all-clusters-ipv6only
ninja -C {out}/linux-arm64-all-clusters-ipv6only

Expand All @@ -284,6 +316,12 @@ ninja -C {out}/linux-arm64-chip-tool
# Building linux-arm64-chip-tool-ipv6only
ninja -C {out}/linux-arm64-chip-tool-ipv6only

# Building linux-arm64-chip-tool-nodeps
ninja -C {out}/linux-arm64-chip-tool-nodeps

# Building linux-arm64-chip-tool-nodeps-ipv6only
ninja -C {out}/linux-arm64-chip-tool-nodeps-ipv6only

# Building linux-arm64-light
ninja -C {out}/linux-arm64-light

Expand Down Expand Up @@ -359,6 +397,9 @@ ninja -C {out}/linux-x64-all-clusters
# Building linux-x64-all-clusters-app-nodeps
ninja -C {out}/linux-x64-all-clusters-app-nodeps

# Building linux-x64-all-clusters-app-nodeps-ipv6only
ninja -C {out}/linux-x64-all-clusters-app-nodeps-ipv6only

# Building linux-x64-all-clusters-ipv6only
ninja -C {out}/linux-x64-all-clusters-ipv6only

Expand Down Expand Up @@ -386,6 +427,9 @@ ninja -C {out}/linux-x64-chip-tool-ipv6only
# Building linux-x64-chip-tool-nodeps
ninja -C {out}/linux-x64-chip-tool-nodeps

# Building linux-x64-chip-tool-nodeps-ipv6only
ninja -C {out}/linux-x64-chip-tool-nodeps-ipv6only

# Building linux-x64-light
ninja -C {out}/linux-x64-light

Expand Down

0 comments on commit 2271672

Please sign in to comment.