File tree Expand file tree Collapse file tree 5 files changed +7
-10
lines changed Expand file tree Collapse file tree 5 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 245245
246246function get_stdmodules (target )
247247
248- if not target :policy (" build.c++.modules.std" ) then
249- return
250- end
251248 local cpplib = get_cpplibrary_name (target )
252249 if cpplib then
253250 if cpplib == " c++" then
Original file line number Diff line number Diff line change @@ -168,9 +168,6 @@ function _get_std_module_manifest_path(target)
168168end
169169
170170function get_stdmodules (target )
171- if not target :policy (" build.c++.modules.std" ) then
172- return
173- end
174171 local modules_json_path = _get_std_module_manifest_path (target )
175172 if modules_json_path then
176173 local modules_json = json .loadfile (modules_json_path )
Original file line number Diff line number Diff line change 123123-- build c++23 standard modules if needed
124124function get_stdmodules (target , opt )
125125 opt = opt or {}
126- if not target :policy (" build.c++.modules.std" ) then
127- return
128- end
129126 local msvc
130127 if opt .toolchain then
131128 msvc = toolchain .load (" msvc" , {plat = opt .toolchain :plat (), arch = opt .toolchain :arch ()})
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ function _get_targetdeps_modules(target)
274274 if sourcebatch .sourcefiles then
275275 for _ , sourcefile in ipairs (sourcebatch .sourcefiles ) do
276276 modules = modules or {}
277- if support .is_public (dep , sourcefile ) or stdmodules_set :has (sourcefile ) then
277+ if support .is_public (dep , sourcefile ) or ( stdmodules_set and stdmodules_set :has (sourcefile ) ) then
278278 local _fileconfig = dep :fileconfig (sourcefile )
279279 local fileconfig = {}
280280 if _fileconfig then
Original file line number Diff line number Diff line change 315315
316316-- get stdmodules
317317function get_stdmodules (target )
318+ if not target :policy (" build.c++.modules.std" ) then
319+ return
320+ end
318321 local cpplib = get_cpplibrary_name (target )
322+ if not cpplib then
323+ return
324+ end
319325 local stdmodules = memcache ():get2 (cpplib , " c++.modules.stdmodules" )
320326 local stdmodules_set = memcache ():get2 (cpplib , " c++.modules.stdmodules_set" )
321327 if not stdmodules or not stdmodules_set then
You can’t perform that action at this time.
0 commit comments