@@ -202,17 +202,22 @@ jobs:
202
202
godot-prebuilt-patch : ' 4.1'
203
203
204
204
# Special Godot binaries compiled with AddressSanitizer/LeakSanitizer to detect UB/leaks.
205
+ # See also https://rustc-dev-guide.rust-lang.org/sanitizers.html.
206
+ #
205
207
# Additionally, the Godot source is patched to make dlclose() a no-op, as unloading dynamic libraries loses stacktrace and
206
208
# cause false positives like println!. See https://github.com/google/sanitizers/issues/89.
207
- # The gcc version can possibly be removed later, as it is slower and needs a larger artifact than the clang one.
209
+ #
210
+ # There is also a gcc variant besides clang, which is currently not used.
208
211
- name : linux-memcheck-nightly
209
212
os : ubuntu-20.04
210
213
artifact-name : linux-memcheck-clang-nightly
211
214
godot-binary : godot.linuxbsd.editor.dev.x86_64.llvm.san
212
215
godot-args : -- --disallow-focus
213
216
rust-toolchain : nightly
214
- rust-env-rustflags : -Zrandomize-layout
217
+ rust-env-rustflags : -Zrandomize-layout -Zsanitizer=address
215
218
rust-extra-args : --features godot/custom-godot
219
+ # Sanitizers can't build proc-macros and build scripts; with --target, cargo ignores RUSTFLAGS for those two.
220
+ rust-target : x86_64-unknown-linux-gnu
216
221
godot-prebuilt-patch : ' 4.1'
217
222
218
223
# Linux under Godot 4.0.x
@@ -246,8 +251,9 @@ jobs:
246
251
godot-binary : godot.linuxbsd.editor.dev.x86_64.llvm.san
247
252
godot-args : -- --disallow-focus
248
253
rust-toolchain : nightly
249
- rust-env-rustflags : -Zrandomize-layout
250
-
254
+ rust-env-rustflags : -Zrandomize-layout -Zsanitizer=address
255
+ # Sanitizers can't build proc-macros and build scripts; with --target, cargo ignores RUSTFLAGS for those two.
256
+ rust-target : x86_64-unknown-linux-gnu
251
257
252
258
steps :
253
259
- uses : actions/checkout@v3
@@ -262,6 +268,7 @@ jobs:
262
268
rust-extra-args : ${{ matrix.rust-extra-args }}
263
269
rust-toolchain : ${{ matrix.rust-toolchain || 'stable' }}
264
270
rust-env-rustflags : ${{ matrix.rust-env-rustflags }}
271
+ rust-target : ${{ matrix.rust-target }}
265
272
with-llvm : ${{ contains(matrix.name, 'macos') && contains(matrix.rust-extra-args, 'custom-godot') }}
266
273
godot-check-header : ${{ matrix.godot-check-header }}
267
274
0 commit comments