I am making a release mod makefile but there is a error(I am on macos big sur): ld: warning: option -s is obsolete and being ignored
g++ -c src/*.cpp -std=c++17 -m64 -O3 -Wall -I include && g++ *.o -o bin/debug/Debug -s && ./bin/debug/Debug
I am making a release mod makefile but there is a error(I am on macos big sur): ld: warning: option -s is obsolete and being ignored
g++ -c src/*.cpp -std=c++17 -m64 -O3 -Wall -I include && g++ *.o -o bin/debug/Debug -s && ./bin/debug/Debug
As you are being told by the warning, the -s
option that your makefile is passing to g++:
... && g++ *.o -o bin/debug/Debug -s && ...
here: ^^
doesn't do anything anymore. So you can just remove it from the script and the warning will go away. The warning comes from ld
because g++
delegates part of the compilation process to it.
If you still want to strip the symbols table from the resulting binary, you need to do it as a post-build step with a separate tool, such as strip
.