File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 19
19
20
20
SCRIPT_DIR = Path (os .path .dirname (os .path .realpath (__file__ )))
21
21
22
- opt_flags_pattern = re .compile (r"@DECOMP_OPT_FLAGS\s*=\s*(\S*) " )
22
+ opt_flags_pattern = re .compile (r"@DECOMP_OPT_FLAGS\s*=\s*(.*)\s* " )
23
23
24
24
class BuildFileType (Enum ):
25
25
C = 1
@@ -266,6 +266,12 @@ def __write_dll_builds(self):
266
266
# Compile DLL sources
267
267
dll_link_deps : "list[str]" = []
268
268
for file in dll .files :
269
+ # Determine variables
270
+ variables : dict [str , str ] = {}
271
+ opt = file .opt
272
+ if opt is not None and opt != self .config .default_opt_flags :
273
+ variables ["OPT_FLAGS" ] = opt
274
+
269
275
# Determine command
270
276
command : str
271
277
if file .type == BuildFileType .C :
@@ -280,7 +286,7 @@ def __write_dll_builds(self):
280
286
# Write command
281
287
obj_build_path = f"$BUILD_DIR/{ Path (file .obj_path ).as_posix ()} "
282
288
src_build_path = Path (file .src_path ).as_posix ()
283
- self .writer .build (obj_build_path , command , src_build_path )
289
+ self .writer .build (obj_build_path , command , src_build_path , variables = variables )
284
290
dll_link_deps .append (obj_build_path )
285
291
286
292
# Link
You can’t perform that action at this time.
0 commit comments