diff --git a/compiler/comptime.v b/compiler/comptime.v index b0286e1763..987018d347 100644 --- a/compiler/comptime.v +++ b/compiler/comptime.v @@ -31,7 +31,7 @@ fn (p mut Parser) comp_time() { } p.check(.lcbr) os := os_from_string(name) - if p.fileis('runtime.v') && os != p.os { + if false && p.fileis('runtime.v') && os != p.os { // `$if os {` for a different target, skip everything inside // to avoid compilation errors (like including // on non-Windows systems) diff --git a/vlib/runtime/runtime.v b/vlib/runtime/runtime.v index 2d11a30730..d008eb0275 100644 --- a/vlib/runtime/runtime.v +++ b/vlib/runtime/runtime.v @@ -1,14 +1,16 @@ module runtime +/* $if linux { #include fn C.get_nprocs() int } +*/ pub fn nr_cpus() int { - $if linux { - return C.get_nprocs() - } + //$if linux { + //return C.get_nprocs() + //} return 0 } diff --git a/vlib/runtime/runtime_lin.v b/vlib/runtime/runtime_lin.v index 842a54487b..18c61de478 100644 --- a/vlib/runtime/runtime_lin.v +++ b/vlib/runtime/runtime_lin.v @@ -4,10 +4,3 @@ module runtime -#include - -fn C.get_nprocs() int - -pub fn nr_cpus() int { - return C.get_nprocs() -}