From fc5e189ce9e7f0e1e1f585a67c73fddc293c6e9a Mon Sep 17 00:00:00 2001 From: Martin Hermant Date: Mon, 29 May 2017 10:28:00 -0400 Subject: [PATCH] wscript : add spacing after -o flag (else not processed by emmc) --- wscript | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/wscript b/wscript index 6363f1e5..071d72ff 100644 --- a/wscript +++ b/wscript @@ -107,6 +107,18 @@ def configure(ctx): ctx.load('waf_unit_test') ctx.load('gnu_dirs') + target_platform = sys.platform + if ctx.options.target_platform: + target_platform = ctx.options.target_platform + + + if target_platform=='emscripten': + # need to force spaces between flag -o and path + # inspired from : + # https://github.com/waf-project/waf/blob/master/waflib/extras/c_emscripten.py (#1885) + # (OSX /emscripten 1.37.9) + ctx.env.CC_TGT_F = ['-c', '-o', ''] + ctx.env.CCLNK_TGT_F = ['-o', ''] # check for common headers ctx.check(header_name='stdlib.h') ctx.check(header_name='stdio.h') @@ -117,9 +129,6 @@ def configure(ctx): ctx.check(header_name='getopt.h', mandatory = False) ctx.check(header_name='unistd.h', mandatory = False) - target_platform = sys.platform - if ctx.options.target_platform: - target_platform = ctx.options.target_platform ctx.env['DEST_OS'] = target_platform if ctx.options.build_type == "debug": -- 2.11.0