@@ -359,9 +359,9 @@ define SetupCompileNativeFileBody
359
359
$1_FLAGS := $(BASIC_ASFLAGS) $$($1_BASE_ASFLAGS)
360
360
$1_COMPILER := $(AS)
361
361
362
- # gcc assembly files must contain an appropriate relative .file
362
+ # gcc or clang assembly files must contain an appropriate relative .file
363
363
# path for reproducible builds.
364
- ifeq ($(TOOLCHAIN_TYPE), gcc)
364
+ ifneq ($(findstring $( TOOLCHAIN_TYPE), gcc clang), )
365
365
# If no absolute paths allowed, work out relative source file path
366
366
# for assembly .file substitution, otherwise use full file path
367
367
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), false)
@@ -403,8 +403,9 @@ define SetupCompileNativeFileBody
403
403
$1_OBJ_DEPS := $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
404
404
$$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE)
405
405
$1_COMPILE_OPTIONS := $$($1_FLAGS) $(CC_OUT_OPTION)$$($1_OBJ) $$($1_SRC_FILE)
406
- # For reproducible builds with gcc ensure random symbol generation is seeded deterministically
407
- ifeq ($(TOOLCHAIN_TYPE), gcc)
406
+ # For reproducible builds with gcc and clang ensure random symbol generation is
407
+ # seeded deterministically
408
+ ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
408
409
ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
409
410
$1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
410
411
endif
0 commit comments