diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5309f07c..239d129bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -234,8 +234,11 @@ jobs: popd fi - haxe -hl out/main.c -cp other/tests -main HelloWorld -D hlgen.makefile=ninja - out/main + haxe -hl out/helloworld/main.c -cp other/tests -main HelloWorld -D hlgen.makefile=ninja + out/helloworld/main + + haxe -hl out/fmtsample/main.c -cp other/fmtsample -main FmtSample -D hlgen.makefile=ninja + out/fmtsample/main ;; esac diff --git a/other/fmtsample/FmtSample.hx b/other/fmtsample/FmtSample.hx new file mode 100644 index 000000000..6939fbf74 --- /dev/null +++ b/other/fmtsample/FmtSample.hx @@ -0,0 +1,10 @@ +function main() { + var out = haxe.io.Bytes.alloc(16); + var src = haxe.io.Bytes.ofString("Hello World!"); + hl.Format.digest(out.getData(), src.getData(), src.length, 0 /* md5 */); + final expected = "ed076287532e86365e841e92bfc50d8c"; + final got = out.toHex(); + if (got != expected) { + throw 'expected $expected, got $got'; + } +} \ No newline at end of file diff --git a/other/haxelib/Run.hx b/other/haxelib/Run.hx index 4ec739c38..03942eeb8 100644 --- a/other/haxelib/Run.hx +++ b/other/haxelib/Run.hx @@ -60,8 +60,8 @@ class NinjaGenerator { gen.bind('cflags', '$opt_flag -std=c11 -DHL_MAKE -Wall -I. -pthread'); final libflags = config.libs.map((lib) -> switch lib { case "std": "-lhl"; - case "uv": '-l:$lib.hdll -luv'; - case var lib: '-l:$lib.hdll'; + case "uv": '/usr/local/lib/$lib.hdll -luv'; + case var lib: '/usr/local/lib/$lib.hdll'; }).join(' '); gen.bind('ldflags', '-pthread -lm -L/usr/local/lib $libflags $rpath'); gen.rule('cc', [