summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-06-19 21:54:02 +0800
committerruki <[email protected]>2022-06-19 21:54:02 +0800
commit644e491a56321b3bf0fd0e47b6af83b55d5cdd6a (patch)
tree7dbbc4a185c6a4d41ff8b13c69f82d6f813feaf6
parent5272495ba9a1963a3c6ba4dc027614748b6896f2 (diff)
get outdata for fallback
-rw-r--r--xmake/modules/private/cache/build_cache.lua4
-rw-r--r--xmake/modules/private/service/distcc_build/client.lua8
2 files changed, 9 insertions, 3 deletions
diff --git a/xmake/modules/private/cache/build_cache.lua b/xmake/modules/private/cache/build_cache.lua
index a06aabe50..4ded1d5c9 100644
--- a/xmake/modules/private/cache/build_cache.lua
+++ b/xmake/modules/private/cache/build_cache.lua
@@ -201,7 +201,9 @@ function build(program, argv, opt)
if not ok then
-- we fallback to compile original source file if compiling preprocessed file fails.
-- https://github.com/xmake-io/xmake/issues/2467
- compile_fallback()
+ local outdata, errdata = compile_fallback()
+ cppinfo.outdata = outdata
+ cppinfo.errdata = errdata
_g.compile_fallback_count = (_g.compile_fallback_count or 0) + 1
end
else
diff --git a/xmake/modules/private/service/distcc_build/client.lua b/xmake/modules/private/service/distcc_build/client.lua
index 37033abd7..d4e71e32c 100644
--- a/xmake/modules/private/service/distcc_build/client.lua
+++ b/xmake/modules/private/service/distcc_build/client.lua
@@ -261,7 +261,9 @@ function distcc_build_client:compile(program, argv, opt)
if not ok then
-- we fallback to compile original source file if compiling preprocessed file fails.
-- https://github.com/xmake-io/xmake/issues/2467
- compile_fallback()
+ local outdata, errdata = compile_fallback()
+ cppinfo.outdata = outdata
+ cppinfo.errdata = errdata
end
else
session:compile(cppinfo.sourcefile, cppinfo.objectfile, cppinfo.cppfile, cppinfo.cppflags,
@@ -292,7 +294,9 @@ function distcc_build_client:compile(program, argv, opt)
if not ok then
-- we fallback to compile original source file if compiling preprocessed file fails.
-- https://github.com/xmake-io/xmake/issues/2467
- compile_fallback()
+ local outdata, errdata = compile_fallback()
+ cppinfo.outdata = outdata
+ cppinfo.errdata = errdata
end
else
compile(program, cppinfo, opt)