- tape.cc: 上一次加 cstring 时把换行写成了字面量 \ ,导致 <cstring> 根本没被包含; GCC 靠 libstdc++ 的传递包含躲过去了,clang 报 no member named 'memcpy' in namespace 'std' - CMakeLists: 去掉 -march=native。Debian 的 clang 14 直接拒绝这个选项, 而且产物应该能在别的 arm64 机器上跑
This commit is contained in:
1 parent
b94f1da232
commit
aa2812acc9
2 files changed
+5
-4
No files matched your search
+3
-3
@@ -44,9 +44,9 @@ target_link_libraries(r8forge_core PUBLIC Threads::Threads)
|
||||
|
||||
# 别再 set(CMAKE_CXX_FLAGS ...) 了:那会把默认 flag 整个换掉,MSVC 下丢 /EHsc、
|
||||
# 还会把 -O3 塞进 Debug 和 /RTC1 打架。Release 配置本来就带 -O3 / /O2 和 NDEBUG。
|
||||
if(NOT MSVC)
|
||||
add_compile_options($<$<CONFIG:Release>:-march=native>)
|
||||
endif()
|
||||
# Release 配置本来就有 -O3 / /O2;刻意不加 -march=native:
|
||||
# clang 14(Debian arm64)直接报 does not support '-march=native',
|
||||
# 而且产物要能在别的 arm64 机器上跑。
|
||||
|
||||
add_executable(r8forge tests/asm_test.cc)
|
||||
target_link_libraries(r8forge r8forge_core)
|
||||
|
||||
+2
-1
@@ -2,7 +2,8 @@
|
||||
|
||||
#include "r8forge/geometry.hh"
|
||||
|
||||
#include <algorithm>`n#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
Reference in new issue
Block a user