forked from mirrors/nixpkgs
terra: delete now-unnecessary patches
This commit is contained in:
parent
999e5d9cdf
commit
709dd2dc64
|
@ -1,31 +0,0 @@
|
|||
diff --git a/src/tcompiler.cpp b/src/tcompiler.cpp
|
||||
index 873d25e..61f3517 100644
|
||||
--- a/src/tcompiler.cpp
|
||||
+++ b/src/tcompiler.cpp
|
||||
@@ -312,6 +312,10 @@ int terra_inittarget(lua_State *L) {
|
||||
else
|
||||
TT->CPU = llvm::sys::getHostCPUName().str();
|
||||
|
||||
+ if (TT->CPU == "generic") {
|
||||
+ TT->CPU = "x86-64";
|
||||
+ }
|
||||
+
|
||||
if (!lua_isnil(L, 3))
|
||||
TT->Features = lua_tostring(L, 3);
|
||||
else {
|
||||
@@ -3198,10 +3202,13 @@ static int terra_disassemble(lua_State *L) {
|
||||
static bool FindLinker(terra_State *T, LLVM_PATH_TYPE *linker, const char *target) {
|
||||
#ifndef _WIN32
|
||||
#if LLVM_VERSION >= 36
|
||||
- *linker = *sys::findProgramByName("gcc");
|
||||
+ const char *linker_name = getenv("CC");
|
||||
+ if (!linker_name) linker_name = getenv("CXX");
|
||||
+ if (!linker_name) linker_name = "gcc";
|
||||
+ *linker = *sys::findProgramByName(linker_name);
|
||||
return *linker == "";
|
||||
#else
|
||||
- *linker = sys::FindProgramByName("gcc");
|
||||
+ *linker = sys::FindProgramByName(getenv("CXX"));
|
||||
return *linker == "";
|
||||
#endif
|
||||
#else
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 5de3e53..475659a 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -386,6 +386,11 @@ foreach(TERRA_TEST ${TERRA_TESTS})
|
||||
COMMAND $<TARGET_FILE:TerraExecutable> ${TERRA_TEST}
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests
|
||||
)
|
||||
+ set_tests_properties(
|
||||
+ ${TERRA_TEST} PROPERTIES
|
||||
+ ENVIRONMENT "LUA_PATH=./?.lua"
|
||||
+ ENVIRONMENT "INCLUDE_PATH=@INCLUDE_PATH@"
|
||||
+ )
|
||||
endforeach()
|
||||
foreach(TERRA_TEST ${TERRA_TESTS_INSTALL})
|
||||
get_filename_component(TERRA_TEST_DIR ${TERRA_TEST} DIRECTORY)
|
Loading…
Reference in a new issue