diff --git a/vial/rt/fs.hlx b/vial/rt/fs.hlx index b9b9537a..fe7b2224 100644 --- a/vial/rt/fs.hlx +++ b/vial/rt/fs.hlx @@ -26,7 +26,7 @@ const eval if defined(_WIN32) { } fn read_file(path: types::Path) -> string? { - var ifs = libcxx::ifstream(path.generic_wstring(), libcxx::ios::binary); + var ifs = libcxx::ifstream(path.generic_string(), libcxx::ios::binary); if !ifs { return null; diff --git a/xmake.lua b/xmake.lua index 3ca7072d..fd3b69a4 100644 --- a/xmake.lua +++ b/xmake.lua @@ -54,7 +54,7 @@ function get_runtime(abi) return "c++_static" elseif abi == "gcc" then - return "stdc++_static" + return "libc++" elseif abi == "msvc" then return "MT" @@ -166,12 +166,15 @@ local function setup_env() set_languages(cxx_standard) -- Set the runtime - set_runtimes(runtime) + if not (abi == "gcc") + then + set_runtimes(runtime) + end end local function helix_src_setup() -- Include dir - add_includedirs("source") + add_includedirs("source") -- Add source fikes add_files("source/**.cc") -- add all files in the source directory