New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: bump fbw dev env #8585
base: master
Are you sure you want to change the base?
build: bump fbw dev env #8585
Conversation
Please also adjust the Rust version to 1.74 in rust-toolchain.toml |
I assume you tested this? A while ago when I updated the dev env this lead to compile issues. |
I did and everything worked fine 👍 In fact we could even go to 1.77 from what I could see. 1.74 is default on dev-env though. If we go to 1.77 without a new image, that would work but will cause download of rust dependencies on every build. |
Note: This PR causes issues with builds running in SU14, do not merge until SU15 release. |
Bumped to the 1.74.1 patch release. The dev-env only specifies 1.74 which is a bit loose for production IMO. Which exact release will it have in any given scenario? -e- Might then wait for https://github.com/flybywiresim/dev-env/pull/16. Looks like some fixes will also be needed to build with 1.74.
|
rust-lang/rust#115010 caused the fuel and payload sys to start failing. Seems they never intended this type of lifetime elision. |
What counts is the version in |
Indeed, but better to make them match so a download isn’t required. It takes a while. |
SU15 has just been released, RTM? |
There’s one sdk update we missed, might want to incorporate that so we only have the change once 👍 |
Does not work with our llvm installation and seems like the option is a custom addition by asobo
-fdata-sections \ | ||
-fno-stack-protector \ | ||
-fstack-size-section \ | ||
-fwritable-strings \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-fwritable-strings \ |
I don't think this flag is a good idea. It's to allow old code that expected to be able to write to string constants.
@@ -13,7 +13,7 @@ if [ "$1" == "--debug" ]; then | |||
WASMLD_ARGS="" | |||
CLANG_ARGS="-g" | |||
else | |||
WASMLD_ARGS="-O2 --lto-O2 --strip-debug" | |||
WASMLD_ARGS="-O2 --lto-O2 --strip-debug --gc-sections" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest keeping this one in the common build flags so we strip unused cruft out of all binaries. Unfortunately GH won't let me suggest keeping the deleted line below (165).
WASMLD_ARGS="-O2 --lto-O2 --strip-debug --gc-sections" | |
WASMLD_ARGS="-O2 --lto-O2 --strip-debug" |
@@ -10,7 +10,7 @@ set(FBW_COMMON ${FBW_ROOT}/fbw-common/src/wasm) | |||
include("${FBW_COMMON}/cpp-msfs-framework/cmake/TargetDefinition.cmake") | |||
|
|||
# compiler refinement | |||
set(COMPILER_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-unused-command-line-argument -Wno-ignored-attributes -Wno-macro-redefined -target wasm32-unknown-wasi --sysroot \"${MSFS_SDK}/WASM/wasi-sysroot\" -mthread-model single -fno-exceptions -fms-extensions -fvisibility=hidden -ffunction-sections -fdata-sections -fno-stack-protector") | |||
set(COMPILER_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-unused-command-line-argument -Wno-ignored-attributes -Wno-macro-redefined -target wasm32-unknown-wasi --sysroot \"${MSFS_SDK}/WASM/wasi-sysroot\" -mthread-model single -fno-exceptions -fms-extensions -fvisibility=hidden -ffunction-sections -fwritable-strings -fdata-sections -Werror=return-type -fno-stack-protector -fstack-size-section -mbulk-memory") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this flag is a good idea. It's to allow old code that expected to be able to write to string constants.
set(COMPILER_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-unused-command-line-argument -Wno-ignored-attributes -Wno-macro-redefined -target wasm32-unknown-wasi --sysroot \"${MSFS_SDK}/WASM/wasi-sysroot\" -mthread-model single -fno-exceptions -fms-extensions -fvisibility=hidden -ffunction-sections -fwritable-strings -fdata-sections -Werror=return-type -fno-stack-protector -fstack-size-section -mbulk-memory") | |
set(COMPILER_FLAGS "-Wall -Wextra -Wno-unused-function -Wno-unused-command-line-argument -Wno-ignored-attributes -Wno-macro-redefined -target wasm32-unknown-wasi --sysroot \"${MSFS_SDK}/WASM/wasi-sysroot\" -mthread-model single -fno-exceptions -fms-extensions -fvisibility=hidden -ffunction-sections -fdata-sections -Werror=return-type -fno-stack-protector -fstack-size-section -mbulk-memory") |
@@ -9,7 +9,7 @@ if [ "$1" == "--debug" ]; then | |||
WASMLD_ARGS="" | |||
CLANG_ARGS="-g" | |||
else | |||
WASMLD_ARGS="-O2 --lto-O2 --strip-debug" | |||
WASMLD_ARGS="-O2 --lto-O2 --strip-debug --gc-sections" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, keep common.
WASMLD_ARGS="-O2 --lto-O2 --strip-debug --gc-sections" | |
WASMLD_ARGS="-O2 --lto-O2 --strip-debug" |
-fdata-sections \ | ||
-fno-stack-protector \ | ||
-fstack-size-section \ | ||
-fwritable-strings \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-fwritable-strings \ |
@@ -23,7 +23,7 @@ macro(add_wasm_library) | |||
# we use `cp` to copy the unoptimized wasm file to the output directory | |||
set(WASM_OPT_FULL_CMD cp ${CMAKE_CURRENT_BINARY_DIR}/${ADD_WASM_LIBRARY_NAME}.wasm ${OUTPUT_DIRECTORY}/) | |||
else() | |||
set(WASM_LD_ARGS -O2 --lto-O2 --strip-debug) | |||
set(WASM_LD_ARGS -O2 --lto-O2 --strip-debug --gc-sections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set(WASM_LD_ARGS -O2 --lto-O2 --strip-debug --gc-sections) | |
set(WASM_LD_ARGS -O2 --lto-O2 --strip-debug) |
@@ -13,7 +13,7 @@ macro(add_wasm_library) | |||
endforeach() | |||
|
|||
# wasm-ld general flags | |||
set(CMAKE_WASM_LINKER_FLAGS --no-entry --allow-undefined --export __wasm_call_ctors --export-dynamic --export malloc --export free --export mallinfo --export mchunkit_begin --export mchunkit_next --export get_pages_state --export mark_decommit_pages --export-table --gc-sections -lc++ -lc++abi -L${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi -lc ${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi/libclang_rt.builtins-wasm32.a) | |||
set(CMAKE_WASM_LINKER_FLAGS --no-entry --allow-undefined --export __wasm_call_ctors --export-dynamic --export malloc --export free --export mallinfo --export mchunkit_begin --export mchunkit_next --export get_pages_state --export mark_decommit_pages --export-table -lc++ -lc++abi -L${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi -lc ${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi/libclang_rt.builtins-wasm32.a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set(CMAKE_WASM_LINKER_FLAGS --no-entry --allow-undefined --export __wasm_call_ctors --export-dynamic --export malloc --export free --export mallinfo --export mchunkit_begin --export mchunkit_next --export get_pages_state --export mark_decommit_pages --export-table -lc++ -lc++abi -L${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi -lc ${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi/libclang_rt.builtins-wasm32.a) | |
set(CMAKE_WASM_LINKER_FLAGS --no-entry --allow-undefined --export __wasm_call_ctors --export-dynamic --export malloc --export free --export mallinfo --export mchunkit_begin --export mchunkit_next --export get_pages_state --export mark_decommit_pages --export-table --gc-sections -lc++ -lc++abi -L${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi -lc ${MSFS_SDK}/WASM/wasi-sysroot/lib/wasm32-wasi/libclang_rt.builtins-wasm32.a) |
@@ -8,7 +8,7 @@ OUTPUT="${DIR}/out/terronnd.wasm" | |||
if [ "$1" == "--debug" ]; then | |||
CLANG_ARGS="-g" | |||
else | |||
WASMLD_ARGS="--strip-debug" | |||
WASMLD_ARGS="--strip-debug --gc-sections" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the common one.
WASMLD_ARGS="--strip-debug --gc-sections" | |
WASMLD_ARGS="--strip-debug" |
-fdata-sections \ | ||
-fno-stack-protector \ | ||
-fstack-size-section \ | ||
-fwritable-strings \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-fwritable-strings \ |
Fixes #[issue_no]
Summary of Changes
Bump FBW dev env to the latest with SDK 0.24.
Screenshots (if necessary)
References
Additional context
Discord username (if different from GitHub):
Testing instructions
Check that the aircraft generally functions okay in SU14 (non-beta).
How to download the PR for QA
Every new commit to this PR will cause new A32NX and A380X artifacts to be created, built, and uploaded.