diff options
Diffstat (limited to 'pw_toolchain/host_gcc')
-rw-r--r-- | pw_toolchain/host_gcc/toolchain.cmake | 2 | ||||
-rw-r--r-- | pw_toolchain/host_gcc/toolchains.gni | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/pw_toolchain/host_gcc/toolchain.cmake b/pw_toolchain/host_gcc/toolchain.cmake index ed011e21c..019c3ae95 100644 --- a/pw_toolchain/host_gcc/toolchain.cmake +++ b/pw_toolchain/host_gcc/toolchain.cmake @@ -29,6 +29,8 @@ include($ENV{PW_ROOT}/pw_trace/backend.cmake) set(CMAKE_C_COMPILER gcc) set(CMAKE_CXX_COMPILER g++) +pw_add_global_compile_options(-std=c++20 LANGUAGES CXX) + # Configure backend for assert facade. pw_set_backend(pw_assert.check pw_assert.print_and_abort_check_backend) pw_set_backend(pw_assert.assert pw_assert.print_and_abort_assert_backend) diff --git a/pw_toolchain/host_gcc/toolchains.gni b/pw_toolchain/host_gcc/toolchains.gni index 66144bbc2..901d08389 100644 --- a/pw_toolchain/host_gcc/toolchains.gni +++ b/pw_toolchain/host_gcc/toolchains.gni @@ -14,6 +14,8 @@ import("//build_overrides/pigweed.gni") +import("$dir_pw_build/defaults.gni") + # Specifies the tools used by host GCC toolchains. _host_gcc_toolchain = { ar = "ar" @@ -34,7 +36,8 @@ pw_toolchain_host_gcc = { name = "host_gcc_debug" forward_variables_from(_host_gcc_toolchain, "*") defaults = { - default_configs = _configs + [ "$dir_pw_build:optimize_debugging" ] + default_configs = pigweed_default_configs + _configs + + [ "$dir_pw_build:optimize_debugging" ] } } @@ -42,7 +45,8 @@ pw_toolchain_host_gcc = { name = "host_gcc_speed_optimized" forward_variables_from(_host_gcc_toolchain, "*") defaults = { - default_configs = _configs + [ "$dir_pw_build:optimize_speed" ] + default_configs = pigweed_default_configs + _configs + + [ "$dir_pw_build:optimize_speed" ] } } @@ -50,7 +54,8 @@ pw_toolchain_host_gcc = { name = "host_gcc_size_optimized" forward_variables_from(_host_gcc_toolchain, "*") defaults = { - default_configs = _configs + [ "$dir_pw_build:optimize_size" ] + default_configs = + pigweed_default_configs + _configs + [ "$dir_pw_build:optimize_size" ] } } } |