1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dll feature test: output #error directive on failure

A common cause of build failures on some systems is that the output
block in the dll feature test silently fails to compile. This leads
to very-hard-to-trace compiler errors about missing identifiers
later on. iffe syntax does not allow aborting compilation if a
block does not compile, however, it does let us produce alternative
output from a shell script if compilation fails. This can be used
to generate an informative #error directive that is inserted in
place of the missing identifiers.

src/lib/libdll/features/dll:
- Add fail block to output block that produces an #error directive.
This commit is contained in:
Martijn Dekker 2021-01-19 22:19:54 +00:00
parent 820bb6a04b
commit e20c0c6b5d

View file

@ -261,4 +261,6 @@ tst - output{
printf("\n");
return 0;
}
}end fail{
echo '#error The output block in src/lib/libdll/features/dll failed to compile'
}end