Skip to content
Permalink
Browse files

added back sse stuff for building the libraries

  • Loading branch information...
larryk85 committed Feb 5, 2019
1 parent 0061fbb commit bf25aaefa69c5f5b1169d8a9fe960b6421b78ae8
@@ -35,6 +35,8 @@ target_include_directories(native_c++
target_link_libraries(c++ c)
target_link_libraries(native_c++ native_c)

target_compile_options(native_c++ PUBLIC -allow-sse)

add_custom_command( TARGET c++ POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:c++> ${BASE_BINARY_DIR}/lib )

add_custom_command( TARGET native_c++ POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:native_c++> ${BASE_BINARY_DIR}/lib )
@@ -16,7 +16,7 @@ file(GLOB THREAD_SOURCES "musl/src/thread/*.c") #only for __lock __unlock

set(INTERNAL_SOURCES musl/src/internal/floatscan.c musl/src/internal/intscan.c musl/src/internal/shgetc.c musl/src/internal/libc.c)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-everything")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-everything -allow-sse")

file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/musl/include/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/musl/src/internal/*.h"
@@ -6,7 +6,8 @@ else()
set(CRT_ASM macho_crt.s)
endif()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-everything")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-everything -allow-sse")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-everything -allow-sse")

file(GLOB HEADERS "*.hpp"
"*.h")
@@ -1,6 +1,7 @@
# Defines builtins library
set(C_DEFINES, "-D__wasm__ -DQUAD_PRECISION")
set( CMAKE_C_FLAGS " -Wall ${CMAKE_C_FLAGS} ${C_DEFINES}" )
set( CMAKE_C_FLAGS " -Wall ${CMAKE_C_FLAGS} ${C_DEFINES} -allow-sse" )
set( CMAKE_CXX_FLAGS " -Wall ${CMAKE_CXX_FLAGS} ${C_DEFINES} -allow-sse" )
set ( builtins_sources
compiler_builtins.cpp
fixtfti.c
@@ -97,6 +97,11 @@ static cl::opt<bool> fuse_main_opt(
"fuse-main",
cl::desc("Use main as entry"),
cl::cat(LD_CAT));
static cl::opt<bool> allow_sse_opt(
"allow-sse",
cl::desc("Should not be used, except for build libc"),
cl::Hidden,
cl::cat(LD_CAT));
/// End of ld options

#ifndef ONLY_LD
@@ -345,18 +350,20 @@ static void GetCompDefaults(std::vector<std::string>& copts) {
copts.emplace_back("--target=x86_64-unknown-darwin-macho");
copts.emplace_back("-mmacosx-version-min=10.13");
copts.emplace_back("-fno-stack-protector");
copts.emplace_back("-mno-sse");
copts.emplace_back("-m64");
#else
copts.emplace_back("--target=x86_64-unknown-linux-gnu");
copts.emplace_back("-mtune=generic");
copts.emplace_back("-m64");
#endif
if (!allow_sse_opt) {
copts.emplace_back("-mno-sse");
copts.emplace_back("-mno-sse2");
copts.emplace_back("-mno-mmx");
copts.emplace_back("-mno-3dnow");
}
if (!fasm_opt) {
copts.emplace_back("-msoft-float");
copts.emplace_back("-DEOSIO_NATIVE");
copts.emplace_back("-DLP64");
copts.emplace_back("-nostdlib");
}
}

0 comments on commit bf25aae

Please sign in to comment.
You can’t perform that action at this time.