You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6098 Reporter: meyer Status: resolved (set by @damiendoligez on 2017-03-01T15:35:32Z) Resolution: suspended Priority: normal Severity: feature Version: 4.01.1+dev Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Bug description
In ocamlbuild we use _tags to associate predicate with list of tags.
Sometimes it's useful to associate globally set tags, usually it's done in such way:
true: debug
: package(foo)
here debug is universally global tag associated with any path in the source tree
Nothing stops us however say this:
debug
: package(foo)
this has the following advantage: it syntactically restrict the tag to work only in global scope. It might be useful for example when mirroring the commandline options as tags:
copts(-O3)
lopts(foo.cma)
I(ocamlbuild)
If the tags where defined using predicate, it might be more difficult to support it in a sane way.
The text was updated successfully, but these errors were encountered:
Normally you define your tags using predicates like this:
and <**/test*>: debug
debug tag will be defined for every source file in src/ directory having an extension of ml or and prefixed with test.
Sometimes however we don't want to associate a predicate with the tag, but instead just want to define a global tag that always holds when it's possible:
O3
for the first tag O3 the C compiler will receive an option -O3.
It's fine to say also:
: O3
It would also allow to use the tags for ocamlbuild itself:
ocamlopt(arm-gnueabi-linux-ocamlopt)
copts(-O3)
In the later case, it's not possible to associate any predicate, as ocamlbuild is invoked once for the source tree.
Acutally hold on, it's still possible to do it for ocamlbuild, because the command line options might have the same name, and we specify targets in ocamlbuild, therefore
Original bug ID: 6098
Reporter: meyer
Status: resolved (set by @damiendoligez on 2017-03-01T15:35:32Z)
Resolution: suspended
Priority: normal
Severity: feature
Version: 4.01.1+dev
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Bug description
In ocamlbuild we use _tags to associate predicate with list of tags.
Sometimes it's useful to associate globally set tags, usually it's done in such way:
here debug is universally global tag associated with any path in the source tree
Nothing stops us however say this:
this has the following advantage: it syntactically restrict the tag to work only in global scope. It might be useful for example when mirroring the commandline options as tags:
If the tags where defined using predicate, it might be more difficult to support it in a sane way.
The text was updated successfully, but these errors were encountered: