Procházet zdrojové kódy

Improve debug compilation options

master
JustAnotherArchivist před 1 rokem
rodič
revize
90616b0d5f
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      .make-and-exec

+ 1
- 1
.make-and-exec Zobrazit soubor

@@ -4,7 +4,7 @@
# Making a symlink named foo-dbg causes it to compile foo.c with -DDEBUG.
# To customise the compilation, you can set a CFLAGS env var before running foo.
sourcename="${0%-dbg}.c"
if [[ "$0" == *-dbg ]]; then opt='-O0 -DDEBUG'; else opt='-O3'; fi
if [[ "$0" == *-dbg ]]; then opt='-Og -fsanitize=undefined,address -DDEBUG'; else opt='-O3'; fi
targetfile="$(dirname "$0")/.make-and-exec-binaries/$(basename "$0")"
if [[ ! -f "${targetfile}" || "${sourcename}" -nt "${targetfile}" ]]; then
mkdir -p "$(dirname "$0")/.make-and-exec-binaries"


Načítá se…
Zrušit
Uložit