Skip to content

Commit 5d5a143

Browse files
tobil4skdimensionscape
authored andcommitted
Fix null c standard with cpp build tool
The standards were Int instead of Null<Int>, so if they were unset (null) they would be coerced to 0 on the c++ build of the build tool, since it is a static target. This resulted in the following error when compiling the hxcpp runtime: g++: error: unrecognized command-line option ‘-std=c0’; did you mean ‘-std=c90’? HaxeFoundation/hxcpp#1405 Fixes #36
1 parent 0e3d67c commit 5d5a143

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎Changes.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ The first libhxcpp version. It is based on hxcpp 4.3 (the changes listed under 4
198198
* Fixed the cppia JIT storing a Bool constant in an Array<Any> as a number (hxcpp #1371)
199199
* Fixed cpp.Lib.load looking for ndlls in Windows64 on Windows ARM64 instead of WindowsArm64 (hxcpp #1400)
200200
* Fixed MinGW GUI builds not showing traces in the console they were started from (hxcpp #1330)
201+
* Fixed the build tool, built as C++, failing on a file group without a C or C++ standard (hxcpp #1405)
201202
* Added the libhxcpp define: a build that uses the library gets -D libhxcpp=<version>. Compare it with version("x.y.z"); a plain string comparison compares text
202203
* Added separate Linux ARMv7 and ARM64 build architectures (hxcpp #1355)
203204
* Fixed AndroidCompat.cpp closing its extern "C" section in the wrong place (hxcpp #1404)

‎tools/hxcpp/File.hx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ class File
2222
public var mFilterOut:String;
2323
public var mEmbedName:String;
2424
public var mScramble:String;
25-
public var mCStandard:Int;
26-
public var mCxxStandard:Int;
27-
public var mObjCStandard:Int;
28-
public var mObjCxxStandard:Int;
25+
public var mCStandard:Null<Int>;
26+
public var mCxxStandard:Null<Int>;
27+
public var mObjCStandard:Null<Int>;
28+
public var mObjCxxStandard:Null<Int>;
2929
static public var mDependMutex = new Mutex();
3030

3131
public function new(inName:String, inGroup:FileGroup)

0 commit comments

Comments
 (0)