parsav  Diff

Differences From Artifact [8d6924c4e0]:

To Artifact [b6e7e54998]:


   656    656   	print(util.dump(config))
   657    657   	os.exit(0)
   658    658   end
   659    659   
   660    660   local holler = print
   661    661   local suffix = config.exe and '' or ('.'..config.outform)
   662    662   local out = 'parsavd' .. suffix
   663         -local linkargs = {}
          663  +local linkargs = {'-g'}
   664    664   local target = config.tgttrip and terralib.newtarget {
   665    665   	Triple = config.tgttrip;
   666    666   	CPU = config.tgtcpu;
   667    667   	FloatABIHard = config.tgthf;
   668    668   } or nil
   669         -
   670    669   if bflag('quiet','q') then holler = function() end end
          670  +
          671  +if target then holler(' * building for triple ' .. tostring(target)) end
   671    672   if bflag('asan','s') then linkargs[#linkargs+1] = '-fsanitize=address' end
   672    673   if bflag('lsan','S') then linkargs[#linkargs+1] = '-fsanitize=leak' end
   673    674   
   674         -for _,p in pairs(config.pkg) do util.append(linkargs, p.linkargs) end
          675  +if config.exe then
          676  +	for _,p in pairs(config.pkg) do util.append(linkargs, p.linkargs) end
          677  +end
   675    678   local linkargs_d = linkargs -- controller is not multithreaded
   676    679   if config.posix then
   677    680   	linkargs_d[#linkargs_d+1] = '-pthread'
   678    681   end
   679    682   
   680         -holler(' → linking \27[1mparsav\27[m with "' .. table.concat(linkargs,' ') .. '"')
          683  +holler(' → writing \27[1mparsav\27[m with "' .. table.concat(linkargs,' ') .. '"')
   681    684   terralib.saveobj('parsav' ..suffix, { main = lib.mgtool }, linkargs, target)
   682    685   
   683         -holler(' → linking \27[1mparsavd\27[m with "' .. table.concat(linkargs_d,' ') .. '"')
          686  +holler(' → writing \27[1mparsavd\27[m with "' .. table.concat(linkargs_d,' ') .. '"')
   684    687   terralib.saveobj('parsavd'..suffix, { main = entry_daemon }, linkargs_d, target)