File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 10
10
container-version :
11
11
required : true
12
12
type : string
13
+ env :
14
+ RUSTFLAGS : " -Dwarnings"
15
+ CFLAGS : " -Werror"
13
16
14
17
jobs :
15
18
check-sigs :
54
57
runs-on : ubuntu-22.04
55
58
container :
56
59
image : ${{ inputs.container-repo }}:${{ inputs.container-version }}
57
- env :
58
- RUSTFLAGS : " -Dwarnings"
59
60
steps :
60
61
- name : Clone the repo
61
62
uses : actions/checkout@v4
81
82
runs-on : ubuntu-22.04
82
83
container :
83
84
image : ${{ inputs.container-repo }}:${{ inputs.container-version }}
84
- env :
85
- RUSTFLAGS : " -Dwarnings"
86
85
steps :
87
86
- name : Clone the repo
88
87
uses : actions/checkout@v4
@@ -170,8 +169,6 @@ jobs:
170
169
runs-on : ubuntu-22.04
171
170
container :
172
171
image : ${{ inputs.container-repo }}:${{ inputs.container-version }}
173
- env :
174
- RUSTFLAGS : " -Dwarnings"
175
172
steps :
176
173
- name : Clone the repo
177
174
uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -243,6 +243,10 @@ set(CMAKE_C_FLAGS_RELEASE "-Os -DNDEBUG")
243
243
set (CMAKE_C_FLAGS_DEBUG "-Os -ggdb" )
244
244
set (CMAKE_C_FLAGS_RELWITHDEBINFO "-Os -ggdb -DNDEBUG" )
245
245
246
+ if (DEFINED ENV{RUSTFLAGS})
247
+ set (RUSTFLAGS $ENV{RUSTFLAGS} )
248
+ endif ()
249
+
246
250
#-----------------------------------------------------------------------------
247
251
# Print system information and build options
248
252
@@ -270,6 +274,7 @@ message(STATUS "Compiler cache: ${CMAKE_C_COMPILER_LAUNCHER}")
270
274
message (STATUS "Linker: ${CMAKE_LINKER} " )
271
275
message (STATUS "Archiver: ${CMAKE_AR} " )
272
276
message (STATUS "Default CFLAGS: ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} }" )
277
+ message (STATUS "Default RUSTFLAGS: ${RUSTFLAGS} " )
273
278
message (STATUS "Default EXE LDFLAGS: ${CMAKE_EXE_LINKER_FLAGS} " )
274
279
message (STATUS " - Options -" )
275
280
message (STATUS "Build type: ${CMAKE_BUILD_TYPE} " )
Original file line number Diff line number Diff line change @@ -230,12 +230,12 @@ else()
230
230
set (RUST_PROFILE "release" )
231
231
set (RUST_CARGO_FLAGS "--release" )
232
232
# For binary reproducibility, strip path prefixes that can be different depending on environment (e.g. /home/<user>, etc.).
233
- set ( RUSTFLAGS "--remap-path-prefix=${CMAKE_CURRENT_SOURCE_DIR} /rust=src --remap-path-prefix=$ENV{HOME} =" )
233
+ string ( APPEND RUSTFLAGS " --remap-path-prefix=${CMAKE_CURRENT_SOURCE_DIR} /rust=src --remap-path-prefix=$ENV{HOME} =" )
234
234
endif ()
235
235
236
236
# Use libsecp256k1 that we link ourselves.
237
237
# See https://github.com/rust-bitcoin/rust-secp256k1/tree/7c8270a8506e31731e540fab7ee1abde1f48314e/secp256k1-sys#linking-to-external-symbols
238
- set ( RUSTFLAGS "${RUSTFLAGS} --cfg=rust_secp_no_symbol_renaming" )
238
+ string ( APPEND RUSTFLAGS " --cfg=rust_secp_no_symbol_renaming" )
239
239
240
240
if (CMAKE_CROSSCOMPILING )
241
241
set (RUST_TARGET_ARCH thumbv7em-none-eabi)
You can’t perform that action at this time.
0 commit comments