Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Fixes for Windows #14

Merged
merged 2 commits into from
Nov 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/builtins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,18 @@ else ()
endif ()
endforeach ()

# Rust: don't insert a reference to MSVCRT.lib/etc
if (MSVC)
set(_cflags -Zl)
else ()
set(_cflags -std=c99)
endif ()

add_compiler_rt_runtime(clang_rt.builtins
STATIC
ARCHS ${arch}
SOURCES ${${arch}_SOURCES}
CFLAGS "-std=c99"
CFLAGS ${_cflags}
PARENT_TARGET builtins)
endif ()
endforeach ()
Expand Down
4 changes: 3 additions & 1 deletion lib/builtins/int_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
#if defined(_MSC_VER) && !defined(__clang__)
#include <math.h>
#include <stdlib.h>
#include <ymath.h>
// Rust: need to upstream this
// don't include ymath.h, it's not needed + pulls in the C++ stdlib for some reason
// #include <ymath.h>
#endif

#if defined(_MSC_VER) && !defined(__clang__)
Expand Down
6 changes: 6 additions & 0 deletions make/platform/triple.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ ifneq (,$(findstring mips,$(TargetTriple)))
CommonDisabledFunctions := emutls
endif

# Disable emutls on Windows
# emutls works on POSIX only as it uses pthreads
ifneq (,$(findstring windows,$(TargetTriple)))
CommonDisabledFunctions := emutls
endif

# Clear cache is builtin on aarch64-apple-ios
# arm64 and aarch64 are synonims, but iOS targets usually use arm64 (history reasons)
ifeq (aarch64-apple-ios,$(subst arm64,aarch64,$(TargetTriple)))
Expand Down