-
-
Save aicreatbyme/5fb8ed3ebd09a06cbdefd7112784a948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
mkdir build | |
cd build | |
# change the path plz | |
export CC=/path/to/clang; export CXX=/path/to/clang++ | |
export ADDITIONAL="-flto -fuse-ld=gold -Wl,-plugin-opt=save-temps" | |
# which will make original CFLAGS disable, if you still need the former one add "set(CFLAGS += "$ADDITIONAL")" in CMakeLists.txt | |
CFLAGS="$ADDITIONAL" CXXFLAGS="$ADDITIONAL" cmake .. | |
make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment