mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 23:08:36 +00:00
build(release): the Windows clang (ROCm HIP) build takes -gline-tables-only for C and C++ files, so its code does not change
A same-directory control of the Windows HIP rdna3 strata.exe (jobq owner-20261125-1250-2a5a: the symbol build against a build of the same tree in the same folder without STRATA_KEEP_SYMBOLS) still had a different .text (8,066,560 against 8,067,072 bytes) with -g on the C and C++ files. The compile of one file shows why: expert_source.cpp assembled with -g has 10 of its 108,318 instruction lines different from the build without a flag (lea (%rdi,%rdx),%r8; add %r8,%rcx where the other has two adds): the same arithmetic, another instruction selection. -gline-tables-only and -g1 give assembly identical to no flag on expert_source.cpp, native_expert.cpp, session.cpp and remote_experts.cpp, and keep the file and line of every function, which is what a crash address needs (no variable or type information). tools/packaging/keep_symbols.py check on the two strata.exe is the control the release script owner runs.
This commit is contained in:
1 parent
a5bfe0369b
commit
d0717815c2
1 file changed
+5
-3
@@ -19,9 +19,11 @@ if(STRATA_KEEP_SYMBOLS)
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:/Z7>" "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:-Xcompiler /Z7>")
|
||||
add_link_options("LINKER:/DEBUG" "LINKER:/OPT:REF" "LINKER:/OPT:ICF" "LINKER:/INCREMENTAL:NO" "LINKER:/PDBALTPATH:%_PDB%")
|
||||
elseif(WIN32)
|
||||
# clang for Windows (the ROCm HIP build, MSVC target): CodeView through -g, linked by lld-link
|
||||
# (HIP-language files get no flag: -Xarch_host -g changed .text, .hip_fatbin and .rodata of the Linux HIP build, measured with a same-directory control)
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:-g>")
|
||||
# clang for Windows (the ROCm HIP build, MSVC target): CodeView line tables, linked by lld-link
|
||||
# (HIP-language files get no flag: -Xarch_host -g changed .text, .hip_fatbin and .rodata of the Linux HIP build, measured with a same-directory control;
|
||||
# and plain -g changed the instruction selection of expert_source.cpp, 10 of 108,318 lines, in the Windows build: -gline-tables-only and -g1 give
|
||||
# assembly identical to no flag on that file and on three more, so the C and C++ files take -gline-tables-only)
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:-gline-tables-only>")
|
||||
add_link_options("LINKER:/DEBUG" "LINKER:/OPT:REF" "LINKER:/OPT:ICF" "LINKER:/INCREMENTAL:NO" "LINKER:/PDBALTPATH:%_PDB%")
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
|
||||
# icpx -fsycl: -g would reach the device compile too (and the AOT backend), and -Xarch_host -g changed the code: the host pass with line tables
|
||||
|
||||
Reference in new issue
Block a user