build2 / libbuild2-autoconf

Autoconf emulation build system module for build2
MIT License
6 stars 2 forks source link

How to check support for assembly features/directives? #66

Open helmesjo opened 2 months ago

helmesjo commented 2 months ago

Assembler Directives

Assuming that it makes sense to have these HAVE_AS_FUNC, HAVE_AS_ARCHEXT_DOTPROD_DIRECTIVE etc. in libbuild2-autoconf, what would be a reasonable way to check it? AFAICT there is no good way except for test-compiling.

See example here.

Related: #65

boris-kolpackov commented 2 months ago

What would be a reasonable way to check it?

I don't know the details, but seems like compiler name/version (and maybe architecture, if it's architecture-specific, though I doubt it). I assume both GCC and Clang support this since some version and it doesn't apply to MSVC.

AFAICT there is no good way except for test-compiling.

There are no plans to support compile/link probing so for any given test we either need to find a way to do it using other mechanisms (without all the drawbacks of probing) or it doesn't belong in libbuild2-autoconf.