Closed wagcheg closed 3 days ago
Bot detected the issue body's language is not English, translate it automatically.
Title: set_symbols("debug", "hidden") cannot generate .sym for GCC under mode.releasedbg
使用set_symbols("debug", "hidden")时releasedbg模式下不能生成.sym
你要么设置 debug 要么设置 hidden ,这两是互斥的,另外 releasedbg mode 内置了对 debug symbols 设置,所以才能生成 .sym ,你又去改成 hidden ,干掉了,等于改写了 releasedbg 内部的配置,那这个 releasedbg 也就不是 releasedbg 了,仅仅只是 mode name 还是它而已。
Bot detected the issue body's language is not English, translate it automatically.
When using set_symbols("debug", "hidden"), .sym cannot be generated in releasedbg mode
You either set debug or hidden, which are mutually exclusive. In addition, releasedbg mode has built-in settings for debug symbols, so .sym can be generated. If you change it to hidden, it is equivalent to rewriting the internal configuration of releasedbg. Then This releasedbg is no longer releasedbg, it is just the mode name.
https://xmake.io/#/manual/project_target?id=set-symbol-info 这个用法是在manual找到的
像DLL一样生成隐藏符号的so并分离sym并不是一个无用的需求 尽管set_symbols("debug")+add_cxxflags("-fvisibility=hidden")+add_cxxflags("-fvisibility-inlines-hidden")也能实现 但是还是希望有一个良好的API
再试试,xmake update -s dev
Bot detected the issue body's language is not English, translate it automatically.
Try again,
xmake update -s dev
正常了
Bot detected the issue body's language is not English, translate it automatically.
It's normal
Xmake 版本
v2.9.6+20241030
操作系统版本和架构
Linux 6.11.5-arch1-1
描述问题
使用set_symbols("debug", "hidden")时releasedbg模式下不能生成.sym
期待的结果
releasedbg模式下能生成.sym
工程配置
symbol.zip
附加信息和错误日志
$ xmake -vr checking for gcc ... /usr/bin/gcc checking for zig ... no checking for zig ... no checking for nim ... no checking for nim ... no checking for gcc ... /usr/bin/gcc checking for the c++ compiler (cxx) ... gcc checking for /usr/bin/gcc ... ok checking for flags (-fPIC) ... ok checking for flags (-fvisibility-inlines-hidden) ... ok checking for flags (-O3) ... ok checking for flags (-DNDEBUG) ... ok [ 50%]: cache compiling.releasedbg main.cpp /usr/bin/gcc -c -m64 -g -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -o build/.objs/main/linux/x86_64/releasedbg/main.cpp.o main.cpp checking for flags (-MMD -MF) ... ok checking for flags (-fdiagnostics-color=always) ... ok checking for g++ ... /usr/bin/g++ checking for the linker (ld) ... g++ checking for /usr/bin/g++ ... ok checking for flags (-fPIC) ... ok [ 75%]: linking.releasedbg main /usr/bin/g++ -o build/linux/x86_64/releasedbg/main build/.objs/main/linux/x86_64/releasedbg/main.cpp.o -m64 -s [100%]: build ok, spent 1.202s