waf - check size of C type at build time -
i want establish build-time cross-language abi compatibility waf. how go checking size of type (or arbitrary type-like checks), , recording build configuration?
you can create program outputs size. saw apporach on several ./configure
files:
cat << eof > test.c #include <stdio.h> int main () { printf("int %d\n", sizeof(int)); return 0; } eof $(cc) test.c -o out ./out >> sizes rm -f test.c out
of course, testing of erroneous cases , such.
edit: see waf documentation. specially, read run_c_code
method. saving value of sizeof
can write file instead , read python/waf. or, see define_ret
argument.
Comments
Post a Comment