authorgravatar for shritesh@shritesh.comShritesh Bhattarai <shritesh@shritesh.com> 2019-04-13 18:40:28-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-14 10:21:48-04:00
log0f1d92e2cfda7ac633cc66fdf2b0e5e27cdf0f98
treeb23e55357b41fdacaf61fd2ce88a8faadb87d459
parent68d7e4a1b60a52b59bc148a81458a89b9b739ab1

wasm: force single threaded


3 files changed, 9 insertions(+), 0 deletions(-)

src/main.cpp+4
......@@ -921,6 +921,10 @@ int main(int argc, char **argv) {
921921 }
922922 }
923923
924 if (target_is_single_threaded(&target)) {
925 is_single_threaded = true;
926 }
927
924928 if (output_dir != nullptr && enable_cache == CacheOptOn) {
925929 fprintf(stderr, "`--output-dir` is incompatible with --cache on.\n");
926930 return print_error_usage(arg0);
src/target.cpp+4
......@@ -1371,6 +1371,10 @@ bool target_is_wasm(const ZigTarget *target) {
13711371 return target->arch == ZigLLVM_wasm32 || target->arch == ZigLLVM_wasm64;
13721372}
13731373
1374bool target_is_single_threaded(const ZigTarget *target) {
1375 return target_is_wasm(target);
1376}
1377
13741378ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) {
13751379 switch (os) {
13761380 case OsFreestanding:
src/target.hpp+1
......@@ -171,6 +171,7 @@ bool target_abi_is_musl(ZigLLVM_EnvironmentType abi);
171171bool target_is_glibc(const ZigTarget *target);
172172bool target_is_musl(const ZigTarget *target);
173173bool target_is_wasm(const ZigTarget *target);
174bool target_is_single_threaded(const ZigTarget *target);
174175
175176uint32_t target_arch_pointer_bit_width(ZigLLVM_ArchType arch);
176177