@@ -359,9 +359,9 @@ define SetupCompileNativeFileBody
359359 $1_FLAGS := $(BASIC_ASFLAGS) $$($1_BASE_ASFLAGS)
360360 $1_COMPILER := $(AS)
361361
362- # gcc assembly files must contain an appropriate relative .file
362+ # gcc or clang assembly files must contain an appropriate relative .file
363363 # path for reproducible builds.
364- ifeq ($(TOOLCHAIN_TYPE), gcc)
364+ ifneq ($(findstring $( TOOLCHAIN_TYPE), gcc clang), )
365365 # If no absolute paths allowed, work out relative source file path
366366 # for assembly .file substitution, otherwise use full file path
367367 ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), false)
@@ -403,8 +403,9 @@ define SetupCompileNativeFileBody
403403 $1_OBJ_DEPS := $$($1_SRC_FILE) $$($$($1_BASE)_COMPILE_VARDEPS_FILE) \
404404 $$($$($1_BASE)_EXTRA_DEPS) $$($1_VARDEPS_FILE)
405405 $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), )
408409 ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
409410 $1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
410411 endif
0 commit comments