[bazel/dbg copt] fix warning name for GCC

When using --config=dbg, a warning name produces an error
at the beginning of the compilation :

`cc1plus: error: '-Werror=return-stack-address':
no option '-Wreturn-stack-address';
did you mean '-Wreturn-local-addr'?`

Fixed the error following the compiler advice
(tested on Debian 11 using default gcc/g++ versions 10.2.1)

PLEASE NOTE : I guess `return-stack-address` might be related
to CLANG and `return-local-addr` is the GCC equivalent.
I do not know CLANG, nor am i good enough with bazel to know
how to make this option flexible.
pull/36040/head
nipil 1 year ago
parent 4ac804bec9
commit b127359342
  1. 2
      tools/bazel.rc

@ -36,7 +36,7 @@ build:opt --compilation_mode=opt
build:opt --copt=-Wframe-larger-than=16384
build:dbg --compilation_mode=dbg
build:dbg --copt=-Werror=return-stack-address
build:dbg --copt=-Werror=return-local-addr
# Dynamic link cause issues like: `dyld: malformed mach-o: load commands size (59272) > 32768`
# https://github.com/bazelbuild/bazel/issues/9190

Loading…
Cancel
Save