@@ -1197,27 +1197,31 @@ local function luax_archive(archive, compilation_targets)
11971197 },
11981198 },
11991199
1200- -- Lua headers
1201- F .map (compress " $tmp/lib/headers" , {
1202- " lua/lua.h" ,
1203- " lua/luaconf.h" ,
1204- " lua/lauxlib.h" ,
1205- }),
1206-
1207- -- Binary runtimes
1208- compilation_targets : map (function (target )
1209- local libs = F .flatten {
1210- main_luax [target .name ],
1211- main_libluax [target .name ],
1212- libluax [target .name ],
1213- liblua [target .name ],
1214- openssl_libs [target .name ],
1215- }
1216- if has_partial_ld (target ) then
1217- libs = { build_once (" $tmp" / target .name / " obj" / " luax.o" ) { partial_ld [target .name ], libs } }
1218- end
1219- return F .map (compress (" $tmp/lib/targets" / target .name ), libs )
1220- end ),
1200+ compilation_targets and {
1201+
1202+ -- Lua headers
1203+ F .map (compress " $tmp/lib/headers" , {
1204+ " lua/lua.h" ,
1205+ " lua/luaconf.h" ,
1206+ " lua/lauxlib.h" ,
1207+ }),
1208+
1209+ -- Binary runtimes
1210+ compilation_targets : map (function (target )
1211+ local libs = F .flatten {
1212+ main_luax [target .name ],
1213+ main_libluax [target .name ],
1214+ libluax [target .name ],
1215+ liblua [target .name ],
1216+ openssl_libs [target .name ],
1217+ }
1218+ if has_partial_ld (target ) then
1219+ libs = { build_once (" $tmp" / target .name / " obj" / " luax.o" ) { partial_ld [target .name ], libs } }
1220+ end
1221+ return F .map (compress (" $tmp/lib/targets" / target .name ), libs )
1222+ end ),
1223+
1224+ } or {},
12211225
12221226 }
12231227
@@ -1230,6 +1234,7 @@ acc(libraries) {
12301234local luax_lar = targets : map2t (function (target )
12311235 return target .name , release and luax_archive (" $tmp/dist" / target .name / " lib/luax.lar" , cross and targets or F {target })
12321236end )
1237+ luax_lar .lua = luax_archive (" $tmp/dist/lua/lib/luax.lar" )
12331238
12341239-- ===================================================================
12351240section " LuaX Lua implementation"
@@ -1694,9 +1699,10 @@ local dist = (function()
16941699 local cp_to = F .curry (function (dest , file )
16951700 return build .cp (" $dist" / " lua" / dest / file :basename ()) { file }
16961701 end )
1702+ local lar = {luax_lar .lua }
16971703 local files = {
16981704 binaries :filter (pure_lua ) : map (cp_to " bin" ),
1699- libraries :filter (pure_lua ) : map (cp_to " lib" ),
1705+ ( libraries :filter (pure_lua ) .. lar ) : map (cp_to " lib" ),
17001706 }
17011707 local name = F {
17021708 " luax" ,
0 commit comments