From 45e35e884a60063e52fb93f41fa43aecf90fea85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aurel=20Bi=CC=81ly=CC=81?= Date: Mon, 19 Apr 2021 18:05:18 +0200 Subject: [PATCH] fix null access on Windows builds, close #44 --- src/ammer/build/BuildTools.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ammer/build/BuildTools.hx b/src/ammer/build/BuildTools.hx index b16ae08..f39e0f7 100644 --- a/src/ammer/build/BuildTools.hx +++ b/src/ammer/build/BuildTools.hx @@ -73,7 +73,7 @@ class BuildTools { lb.a(' /link'); for (path in opt.libraryPaths) lb.a(' /LIBPATH:"$path"'); - for (lib in opt.libraries.concat(opt.staticLibraries)) // TODO: static/dynamic linking on Windows + for (lib in opt.libraries.concat(opt.staticLibraries != null ? opt.staticLibraries : [])) // TODO: static/dynamic linking on Windows lb.a(' $lib.lib'); } else { lb.ai('cc -m64 ${Sys.systemName() == "Mac" ? "-dynamiclib" : "-fPIC -shared"} -o ${e.target} ${e.requires.join(" ")}'); @@ -196,7 +196,7 @@ class BuildTools { args.push("/link"); for (path in opt.libraryPaths) args.push('/LIBPATH:$path'); - for (lib in opt.libraries.concat(opt.staticLibraries)) // TODO: static/dynamic linking on Windows + for (lib in opt.libraries.concat(opt.staticLibraries != null ? opt.staticLibraries : [])) // TODO: static/dynamic linking on Windows args.push('$lib.lib'); return run('${Ammer.config.pathMSVC}cl', args); } else {