1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

wafsamba: let 'use_hostcc=True' result in -D_SAMBA_HOSTCC_

That's easier for the callers.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2020-04-03 11:49:44 +02:00 committed by Andreas Schneider
parent 4367eeb778
commit 5295046082
2 changed files with 9 additions and 2 deletions

View File

@ -905,9 +905,15 @@ def ADD_EXTRA_INCLUDES(conf, includes):
def CURRENT_CFLAGS(bld, target, cflags, allow_warnings=False, hide_symbols=False):
def CURRENT_CFLAGS(bld, target, cflags,
allow_warnings=False,
use_hostcc=False,
hide_symbols=False):
'''work out the current flags. local flags are added first'''
ret = TO_LIST(cflags)
ret = []
if use_hostcc:
ret += ['-D_SAMBA_HOSTCC_']
ret += TO_LIST(cflags)
if not 'EXTRA_CFLAGS' in bld.env:
list = []
else:

View File

@ -635,6 +635,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source,
target = modname,
samba_cflags = CURRENT_CFLAGS(bld, modname, cflags,
allow_warnings=allow_warnings,
use_hostcc=use_hostcc,
hide_symbols=hide_symbols),
depends_on = depends_on,
samba_deps = TO_LIST(deps),