Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用这里的makefile ,我想用-O2编译我的项目。我唯一FLAGS使用的是
FLAGS
CXX = g++ CXXFLAGS = LDFLAGS = -O2 DEPFLAGS = -MM
仅使用-O2as是否明智和安全LDFLAGS?我想要对可执行文件做的唯一事情就是在我的机器上执行它,仅此而已.. 即,程序已准备好交付。
-O2
LDFLAGS
你应该有CXXFLAGS=-O2(我可能也会添加-Wall -Werror)
CXXFLAGS=-O2
-Wall -Werror