1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
diff --git a/build.py b/build.py
deleted file mode 100755
index c4ecc93e8b..0000000000
--- a/build.py
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env python3
-
-import sys
-from pathlib import Path
-
-path = Path(__file__).resolve().parent / ".github" / "workflows" / "scripts"
-sys.path.insert(0, str(path))
-
-import ti_build.entry
-
-sys.exit(ti_build.entry.main())
diff --git a/cmake/TaichiCore.cmake b/cmake/TaichiCore.cmake
index b716b071d4..994bd2ad84 100644
--- a/cmake/TaichiCore.cmake
+++ b/cmake/TaichiCore.cmake
@@ -176,7 +176,7 @@ if(TI_WITH_LLVM)
Object
ScalarOpts
Support
- native
+ Native
Linker
Target
MC
@@ -196,7 +196,7 @@ if(TI_WITH_LLVM)
target_link_libraries(${CORE_LIBRARY_NAME} PRIVATE cpu_runtime)
if (TI_WITH_CUDA)
- llvm_map_components_to_libnames(llvm_ptx_libs NVPTX)
+ llvm_map_components_to_libnames(llvm_ptx_libs nvptx)
add_subdirectory(taichi/codegen/cuda)
add_subdirectory(taichi/runtime/cuda)
diff --git a/setup.py b/setup.py
index a18598056c..5485c3135d 100644
--- a/setup.py
+++ b/setup.py
@@ -182,7 +182,7 @@ def cmake_install_manifest_filter(manifest_files):
return True
if basename in BLACKLISTED_FILES:
return False
- return f.endswith((".so", "pyd", ".dll", ".bc", ".h", ".dylib", ".cmake", ".hpp", ".lib"))
+ return f.endswith((".so", "pyd", ".dll", ".bc", ".dylib", ".lib"))
return [f for f in manifest_files if should_include(f)]
diff --git a/taichi/runtime/llvm/CMakeLists.txt b/taichi/runtime/llvm/CMakeLists.txt
index 531585315c..1cd83d4c27 100644
--- a/taichi/runtime/llvm/CMakeLists.txt
+++ b/taichi/runtime/llvm/CMakeLists.txt
@@ -20,23 +20,7 @@ target_include_directories(llvm_runtime
${LLVM_INCLUDE_DIRS}
)
-target_link_libraries(llvm_runtime PRIVATE ${llvm_libs})
+ target_link_libraries(llvm_runtime PRIVATE LLVM)
-if (APPLE AND "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
- target_link_libraries(llvm_runtime PRIVATE ${llvm_aarch64_libs})
-endif()
-
-if (TI_WITH_CUDA)
- target_link_libraries(llvm_runtime PRIVATE ${llvm_ptx_libs})
-endif()
-
-if (TI_WITH_AMDGPU)
- target_link_libraries(llvm_runtime PRIVATE ${llvm_amdgpu_libs})
-endif()
-
-if (TI_WITH_DX12)
- target_link_libraries(llvm_runtime PRIVATE ${llvm_directx_libs})
-endif()
-
target_link_libraries(llvm_runtime PRIVATE ti_device_api)
diff --git a/taichi/runtime/llvm/runtime_module/CMakeLists.txt b/taichi/runtime/llvm/runtime_module/CMakeLists.txt
index 3a9115041f..919e4196cc 100644
--- a/taichi/runtime/llvm/runtime_module/CMakeLists.txt
+++ b/taichi/runtime/llvm/runtime_module/CMakeLists.txt
@@ -5,7 +5,7 @@ function(COMPILE_LLVM_RUNTIME rtm_arch)
# Keep this for now, as .bc need to be generated.
add_custom_target(
"generate_llvm_runtime_${rtm_arch}"
- COMMAND ${CLANG_EXECUTABLE} ${CLANG_OSX_FLAGS} -c runtime.cpp -o "runtime_${rtm_arch}.bc" -fno-exceptions -emit-llvm -std=c++17 -D "ARCH_${rtm_arch}" -I ${PROJECT_SOURCE_DIR};
+ COMMAND ${CLANG_EXECUTABLE} ${CLANG_OSX_FLAGS} -c runtime.cpp -o "runtime_${rtm_arch}.bc" -fno-exceptions -emit-llvm -std=c++17 -D "ARCH_${rtm_arch}" -I ${PROJECT_SOURCE_DIR} -fno-stack-protector;
# TODO, it's better to avoid polluting the source dir, keep in build
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
|