@@ -44,10 +44,10 @@ def print_rmc_step_status(step_name, completed_process, verbose=False):
44
44
print (f"[RMC] cmd: { ' ' .join (completed_process .args )} " )
45
45
46
46
47
- def compile_single_rust_file (input_filename , output_filename , verbose = False , debug = False , keep_temps = False ):
47
+ def compile_single_rust_file (input_filename , output_filename , verbose = False , debug = False , keep_temps = False , mangler = "v0" ):
48
48
if not keep_temps :
49
49
atexit .register (delete_file , output_filename )
50
- build_cmd = [RMC_RUSTC_EXE , "-Z" , "codegen-backend=gotoc" ,
50
+ build_cmd = [RMC_RUSTC_EXE , "-Z" , "codegen-backend=gotoc" , "-Z" , f"symbol-mangling-version= { mangler } " ,
51
51
f"--cfg={ RMC_CFG } " , "-o" , output_filename , input_filename ]
52
52
build_env = os .environ
53
53
if debug :
@@ -60,8 +60,8 @@ def compile_single_rust_file(input_filename, output_filename, verbose=False, deb
60
60
return process .returncode
61
61
62
62
63
- def cargo_build (crate , verbose = False , debug = False ):
64
- rustflags = ["-Z" , "codegen-backend=gotoc" , f"--cfg={ RMC_CFG } " ]
63
+ def cargo_build (crate , verbose = False , debug = False , mangler = "v0" ):
64
+ rustflags = ["-Z" , "codegen-backend=gotoc" , "-Z" , f"symbol-mangling-version= { mangler } " , f"--cfg={ RMC_CFG } " ]
65
65
rustflags = " " .join (rustflags )
66
66
if "RUSTFLAGS" in os .environ :
67
67
rustflags = os .environ ["RUSTFLAGS" ] + " " + rustflags
0 commit comments