Add System.disableCFFI in order to force binary dependency-free at runtime

This commit is contained in:
Joshua Granick
2014-09-20 19:32:54 -07:00
parent abc07eeff8
commit 260a6ae565

View File

@@ -14,6 +14,9 @@ import sys.io.Process;
class System {
public static var disableCFFI:Bool;
@:noCompletion private static var __moduleNames:Map<String, String> = null;
#if neko
@@ -124,6 +127,16 @@ class System {
public static function load (library:String, method:String, args:Int = 0, lazy:Bool = false):Dynamic {
#if disable_cffi
var disableCFFI = true;
#end
if (disableCFFI) {
return Reflect.makeVarArgs (function (_) return {});
}
if (lazy) {
#if neko