~sircmpwn/hare-announce

notice: breaking changes to hare::module and the build driver

Details
Message ID
<CVBZVSBUYWTM.263YTGQYGDA58@monch>
DKIM signature
pass
Download raw message
we've completed a rewrite of the build driver. things should be roughly
the same, but:

there have been a few changes to the flags for `hare build`:
  -t was replaced with -a
  -X +tag was replaced with -T -tag (and -X ^ was replaced with -T ^)
  -c was replaced with -t o

the build driver will now attempt to run up to os::cpucount() jobs in
parallel by default, you can disable this by passing `-j 1`

file eligibility in modules is now determined based on both the basename
and the extension, rather than just the basename. for example, in a
module containing "foo.ha" and "foo.s", both of them will be selected

the build driver will now error out when it's ambiguous which file it
should select. specifically, for some basename + extension within a
module such that the highest number of tags on an eligible file with
that basename + extension is N, it will error out when there's more than
one file with N tags. for example, in a module with these files:

foo.ha
foo+linux.ha
foo+x86_64.ha
foo+linux+test.ha

the build driver will error out with the tagset +linux+x86_64, but
select foo+linux+test.ha with the tagset +linux+x86_64+test

the build driver will now consider a.ha and +tag/a.ha to have the same
basename for the purpose of ignoring files with fewer tags. it was
already documented as doing this, but we hadn't implemented it correctly

the build driver will now generate a typedef file for the root module,
which means that use of unexported declarations within exported ones in
the root module will now cause an error

assembly inputs (including the output of qbe) will now be collected into
a single `as` invocation, which means that .section directives may carry
over between them. you likely want to use
`.section .text.fully.qualified.ident` or equivalent anyways, in order
to make things work better with our use of --gc-sections

the api for hare::module has been entirely redone. if you have code that
uses it, feel free to ask for help switching to the new version either
on ~sircmpwn/hare-users@lists.sr.ht or in #hare on libera.chat
Reply to thread Export thread (mbox)