@@ -93,6 +93,14 @@ DEPENDENCY_TARGET_SED_PATTERN := \
9393 -e 's/$$$$/ :/' \
9494 #
9595
96+ ################################################################################
97+ # Setup compiler-specific argument to specify output file
98+ ifeq ($(call isCompiler, microsoft), true)
99+ CC_OUT_OPTION := -Fo
100+ else
101+ CC_OUT_OPTION := -o$(SPACE)
102+ endif
103+
96104################################################################################
97105# Create the recipe needed to compile a single native source file.
98106#
@@ -334,7 +342,7 @@ define CreateWindowsResourceFile
334342 $$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
335343 $$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
336344 $$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
337- $$($1_RC) $$($1_RCFLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION) $$@ \
345+ $$($1_RC) $$($1_RCFLAGS) $$($1_SYSROOT_CFLAGS) -Fo $$@ \
338346 $$($1_VERSIONINFO_RESOURCE) 2>&1 ))
339347 # Windows RC compiler does not support -showIncludes, so we mis-use CL
340348 # for this. Filter out RC specific arguments that are unknown to CL.
@@ -344,7 +352,7 @@ define CreateWindowsResourceFile
344352 $$(call ExecuteWithLog, $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX), \
345353 $$($1_CC) $$(filter-out -l%, $$($1_RCFLAGS)) \
346354 $$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
347- $(CC_OUT_OPTION) $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
355+ -Fo $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
348356 $$($1_VERSIONINFO_RESOURCE)) 2>&1 \
349357 | $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
350358 -e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \
0 commit comments