Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cc_test_flags = [
- ('PIE', '-pie -fPIE'),
- ('gnu99', '-std=gnu99'),
- # this quiets most of macOS warnings on -fpie
- ('unused', '-Qunused-arguments'),
- ]
- FRAGMENT='''
- int main(int argc, char **argv) {
- (void)argc; (void)argv;
- return 0;
- }
- '''
- # check if C compiler supports some flags
- for (name, ccflag) in cc_test_flags:
- ctx.check_cc(define_name='HAS_' + name,
- cflags=ccflag + ' -Werror',
- fragment=FRAGMENT,
- mandatory=False,
- msg='Checking if C compiler supports ' + name,)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement