From 8d2cfef3b5814c32d08e89d7d17d4242b203331b Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 9 Aug 2022 00:35:20 +0800 Subject: fix check for clang/headerunits --- xmake/rules/c++/modules/modules_support/clang.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'xmake/rules/c++/modules/modules_support/clang.lua') diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index f11350764..226756d6c 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -163,13 +163,10 @@ end -- generate target stl header units for batchjobs function generate_stl_headerunits_for_batchjobs(target, batchjobs, headerunits, opt) local compinst = target:compiler("cxx") - - -- get cachedirs local stlcachedir = common.stlmodules_cachedir(target) - - -- get headerunits flags local modulecachepathflag = get_modulecachepathflag(target) local modulefileflag = get_modulefileflag(target) + assert(has_headerunitsupport(target), "compiler(clang): does not support c++ header units!") -- build headerunits local projectdir = os.projectdir() @@ -200,6 +197,7 @@ function generate_stl_headerunits_for_batchcmds(target, batchcmds, headerunits, local stlcachedir = common.stlmodules_cachedir(target) local modulecachepathflag = get_modulecachepathflag(target) local modulefileflag = get_modulefileflag(target) + assert(has_headerunitsupport(target), "compiler(clang): does not support c++ header units!") -- build headerunits local projectdir = os.projectdir() -- cgit v1.3.1