Skip to content

Commit 66b8f88

Browse files
author
Hugh Sanderson
committed
Add 'set' with no name to dump current values. Check for undefined values when linking android
1 parent 5ed5825 commit 66b8f88

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

toolchain/android-toolchain-clang.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@
9292
<flag value ="-shared" />
9393
<flag value="--target=${ABITRIPLE}${PLATFORM_NUMBER}" />
9494

95+
<!-- Build time error, not run time -->
96+
<flag value="-Wl,--no-undefined" unless="HXCPP_ALLOW_UNDEFINED" />
97+
9598
<flag value ="-static-libstdc++" />
9699
<!-- This shows the android link line, which may be so long that it breaks the tool
97100
https://github.com/HaxeFoundation/hxcpp/pull/1091

tools/hxcpp/BuildTool.hx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,6 +2216,13 @@ class BuildTool
22162216
}
22172217
}
22182218

2219+
function dumpDefs()
2220+
{
2221+
Sys.println("Defines:");
2222+
for(k in mDefines.keys())
2223+
Sys.println(' $k=${mDefines.get(k)}');
2224+
}
2225+
22192226
function parseXML(inXML:XmlAccess,inSection:String, forceRelative:Bool)
22202227
{
22212228
for(el in inXML.elements)
@@ -2225,9 +2232,14 @@ class BuildTool
22252232
switch(el.name)
22262233
{
22272234
case "set" :
2228-
var name = substitute(el.att.name);
2229-
var value = substitute(el.att.value);
2230-
mDefines.set(name,value);
2235+
if (el.has.name)
2236+
{
2237+
var name = substitute(el.att.name);
2238+
var value = substitute(el.att.value);
2239+
mDefines.set(name,value);
2240+
}
2241+
else
2242+
dumpDefs();
22312243
case "unset" :
22322244
var name = substitute(el.att.name);
22332245
mDefines.remove(name);

0 commit comments

Comments
 (0)