Browse Source

codec: build.sh: support flag for inlining diagnostics

Ugorji Nwoke 7 years ago
parent
commit
aaea17890a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      codec/build.sh

+ 4 - 3
codec/build.sh

@@ -178,7 +178,7 @@ _clean() {
 _usage() {
 _usage() {
     cat <<EOF
     cat <<EOF
 primary usage: $0 
 primary usage: $0 
-    -[tmpfxld] for [tests, make, prebuild (force) (external), mid-stack inlining, race detector]
+    -[tmpfxnld] for [tests, make, prebuild (force) (external), inlining diagnostics, mid-stack inlining, race detector]
 EOF
 EOF
     if [[ "$(type -t _usage_run)" = "function" ]]; then _usage_run ; fi
     if [[ "$(type -t _usage_run)" = "function" ]]; then _usage_run ; fi
 }
 }
@@ -188,12 +188,13 @@ _main() {
     local x
     local x
     unset zforce zexternal
     unset zforce zexternal
     zargs=()
     zargs=()
-    while getopts ":ctbqmrgupfxlzd" flag
+    while getopts ":ctbqmnrgupfxlzd" flag
     do
     do
         case "x$flag" in
         case "x$flag" in
             'xf') zforce=1 ;;
             'xf') zforce=1 ;;
             'xx') zexternal=1 ;;
             'xx') zexternal=1 ;;
-            'xl') zargs+=("-gcflags=-l=4") ;;
+            'xl') zargs+=("-gcflags"); zargs+=("-l=4") ;;
+            'xn') zargs+=("-gcflags"); zargs+=("-m") ;;
             'xd') zargs+=("-race") ;;
             'xd') zargs+=("-race") ;;
             x\?) _usage; return 1 ;;
             x\?) _usage; return 1 ;;
             *) x=$flag ;;
             *) x=$flag ;;