Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target file is not generated while set_strip("debug") #810

Closed
caizongchao opened this issue May 25, 2020 · 1 comment
Closed

target file is not generated while set_strip("debug") #810

caizongchao opened this issue May 25, 2020 · 1 comment
Labels
Milestone

Comments

@caizongchao
Copy link

caizongchao commented May 25, 2020

xmake: v2.3.3+202005231421
os: ubuntu 20.04, wsl
gcc: 9.3.0
xmake.lua:

target("test")
    set_kind("binary")
    add_files("test.cpp")

    set_strip("debug")

After calling xmake, there's no executable 'test' in the output directory. If set_strip changed to "all", the target file can be generated.

The output of "xmake -v":

configure
{
    arch = x86_64
    ccache = true
    mode = debug
    ndk_stdcxx = true
    host = linux
    ld = /usr/bin/g++
    kind = static
    buildir = build
    cxx = /usr/bin/gcc
    plat = linux
}
[ 75%]: linking.debug test
/usr/bin/g++ -o build/linux/x86_64/debug/test build/.objs/test/linux/x86_64/debug/./test.cpp.o -S -m64 -L/usr/local/lib -L/usr/lib
[100%]: build ok!

I noticed that there's a '-S' option in the command line of g++, accroding to http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options:

-c
-S
-E

If any of these options is used, then the linker is not run, and object file names should not be used as arguments.

Is that option caused this issue?

About the feature of stripping the target file. I need to preserve some symbols instead of stripping all of them, is that possible?

thanks

@waruqi
Copy link
Member

waruqi commented May 26, 2020

I have fixed it, you can run xmake update dev and try it again.

@waruqi waruqi added the bug label May 26, 2020
@waruqi waruqi added this to the v2.3.4 milestone May 26, 2020
@waruqi waruqi closed this as completed May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants