diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-28 13:29:52 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-28 14:07:39 +0200 |
commit | 3a2ca68af3c8bafe9f60f09bd8fece894fe3a925 (patch) | |
tree | c33aa8ccee82b26d868fbc91abed94e2480864c2 /drivers/png/SCsub | |
parent | 243bdc4524ddcf8ac6bef03c378e14fe7bb263b8 (diff) |
SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
Diffstat (limited to 'drivers/png/SCsub')
-rw-r--r-- | drivers/png/SCsub | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/png/SCsub b/drivers/png/SCsub index 39480351a6..986c36c67c 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -26,14 +26,22 @@ if env['builtin_libpng']: ] thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_png.add_source_files(env.drivers_sources, thirdparty_sources) env_png.Append(CPPPATH=[thirdparty_dir]) # Currently .ASM filter_neon.S does not compile on NT. import os - if ("neon_enabled" in env and env["neon_enabled"]) and os.name != "nt": + use_neon = "neon_enabled" in env and env["neon_enabled"] and os.name != "nt" + if use_neon: env_png.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"]) - env_neon = env_png.Clone() + else: + env_png.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) + + env_thirdparty = env_png.Clone() + env_thirdparty.disable_warnings() + env_thirdparty.add_source_files(env.drivers_sources, thirdparty_sources) + + if use_neon: + env_neon = env_thirdparty.Clone() if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] neon_sources = [] @@ -41,8 +49,6 @@ if env['builtin_libpng']: neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon_intrinsics.c")) neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) env.drivers_sources += neon_sources - else: - env_png.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) # Godot source files env_png.add_source_files(env.drivers_sources, "*.cpp") |