Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/hx/libs/mysql/Build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<xml>

<files id="hxcpp_mysql" dir="${this_dir}" >
<options name="Options.txt" ifExists="Options.txt"/>
<depend files="hxcpp-depends"/>
<depend name="${this_dir}/Build.xml" dateOnly="true" />
<depend name="${this_dir}/sha1.h" />
Expand Down
1 change: 1 addition & 0 deletions src/hx/libs/regexp/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
</files>

<files id="hxcpp_regexp">
<options name="Options.txt" ifExists="Options.txt"/>
<depend files="hxcpp-depends"/>
<depend name="${this_dir}/Build.xml" dateOnly="true" />
<cache value="true" asLibrary="true" />
Expand Down
1 change: 1 addition & 0 deletions src/hx/libs/sqlite/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<set name="SQLITE_DIR" value="${HXCPP}/project/thirdparty/sqlite-3.51.2"/>

<files id="hxcpp_sqlite" dir="${this_dir}" >
<options name="Options.txt" ifExists="Options.txt"/>
<depend files="hxcpp-depends"/>
<depend name="${this_dir}/Build.xml" dateOnly="true" />
<cache value="true" asLibrary="true" />
Expand Down
1 change: 1 addition & 0 deletions src/hx/libs/ssl/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<include name="${HXCPP}/project/thirdparty/mbedtls-files.xml" />

<files id="hxcpp_ssl" >
<options name="Options.txt" ifExists="Options.txt"/>
<depend files="hxcpp-depends"/>
<depend name="${this_dir}/Build.xml" dateOnly="true" />
<cache value="true" asLibrary="true" />
Expand Down
1 change: 1 addition & 0 deletions src/hx/libs/std/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<pragma once="true" />

<files id="hxcpp_std" dir="${this_dir}" >
<options name="Options.txt" ifExists="Options.txt"/>
<depend files="hxcpp-depends"/>
<depend name="${this_dir}/Build.xml" dateOnly="true" />
<cache value="1" asLibrary="true" />
Expand Down
1 change: 1 addition & 0 deletions src/hx/zip/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<import name="${HXCPP_ZIP_XML}"/>

<files id="hxcpp_zip_api">
<options name="Options.txt" ifExists="Options.txt"/>
<cache value="true" asLibrary="true" />

<depend files="hxcpp-depends"/>
Expand Down
1 change: 1 addition & 0 deletions src/hx/zip/zlib/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
</files>

<files id="hxcpp_zlib_impl" >
<options name="Options.txt" ifExists="Options.txt"/>
<depend files="hxcpp-depends"/>
<depend name="${this_dir}/Build.xml" dateOnly="true" />
<depend name="${this_dir}/ZLibCompress.hpp"/>
Expand Down
8 changes: 7 additions & 1 deletion tools/hxcpp/BuildTool.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,13 @@ class BuildTool
case "hlsl" :
group.addHLSL( substitute(el.att.name), substitute(el.att.profile),
substitute(el.att.variable), substitute(el.att.target) );
case "options" : group.addOptions( substitute(el.att.name) );
case "options" :
// Resolved now, where ifExists is checked: an imported group is built from its own
// directory, where a relative Options.txt would not be found.
var options = substitute(el.att.name);
if (!PathManager.isAbsolute(options))
options = PathManager.combine(Sys.getCwd(), options);
group.addOptions(options);
case "config" : group.mConfig = substitute(el.att.name);
case "assembler" : group.mAssembler = substitute(el.att.name);
case "compilerflag" :
Expand Down
3 changes: 2 additions & 1 deletion tools/hxcpp/FileGroup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ class FileGroup
var result = new Array<String>();
for(def in contents.split("\n"))
{
var name = def.split("=")[0];//.toLowerCase();
// Haxe writes defines as they were given, so -D HXCPP_M64 arrives upper case
var name = def.split("=")[0].toLowerCase();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, there doesn't seem to be any context behind why this was commented out in 7218783.

Some of those defines we check against below only ever exist in one case (and would be ignored by hxcpp in the wrong case). Rather than making this full case insensitive, maybe we should just modify those individual checks to use the correct case (e.g. check HXCPP_QUIET instead of hxcpp_quiet). I think we would just need to make sure to check both name.indexOf("hxcpp") and name.indexOf("HXCPP") since there are some flags like hxcpp_api_level and hxcpp_smart_strings.

That way we avoid introducing false positives.

if (name.indexOf("hxcpp_link")>=0)
{
// Only effects linking, not compiling
Expand Down
Loading