Skip to content

Commit 2210dd5

Browse files
authored
Align keepnativesymbols option with src/tests/build (#130221)
Before: ```sh # value arg $ ./build.sh --keepnativesymbols true # switch $ src/tests/build.sh --keepnativesymbols ``` After: both scripts have it as a switch, without a value.
1 parent e9914e4 commit 2210dd5

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

‎docs/workflow/building/coreclr/android.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ This can be achieved in `Android Studio` via `Profile or Debug APK`.
201201
202202
> [!NOTE]
203203
> Steps 5) through 8) can be omitted if the runtime is built without stripping debug symbols to a separate file (e.g., `libcoreclr.so.dbg`).
204-
> This can be achieved by including `-keepnativesymbols true` option when building the runtime, e.g.,:
204+
> This can be achieved by including `-keepnativesymbols` option when building the runtime, e.g.,:
205205
> ```
206-
> ./build.sh clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs -os android -arch <x64|arm64> -c Debug -keepnativesymbols true
206+
> ./build.sh clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs -os android -arch <x64|arm64> -c Debug -keepnativesymbols
207207
> ```
208208
209209
## See also

‎eng/build.sh‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ usage()
8686
echo " --gcc Optional argument to build using gcc in PATH (default)."
8787
echo " --gccx.y Optional argument to build using gcc version x.y."
8888
echo " --portablebuild Optional argument: set to false to force a non-portable build."
89-
echo " --keepnativesymbols Optional argument: set to true to keep native symbols/debuginfo in generated binaries."
89+
echo " --keepnativesymbols Optional argument: set to keep native symbols/debuginfo in generated binaries."
9090
echo " --ninja Optional argument: use Ninja instead of Make (default: true, use --ninja false to disable)."
9191
echo " --pgoinstrument Optional argument: build PGO-instrumented runtime"
9292
echo " --fsanitize Optional argument: Specify native sanitizers to instrument the native build with. Supported values are: 'address'."
@@ -506,15 +506,8 @@ while [[ $# -gt 0 ]]; do
506506
;;
507507

508508
-keepnativesymbols)
509-
if [ -z ${2+x} ]; then
510-
echo "No value for keepNativeSymbols is supplied. See help (--help) for supported values." 1>&2
511-
exit 1
512-
fi
513-
passedKeepNativeSymbols="$(echo "$2" | tr "[:upper:]" "[:lower:]")"
514-
if [ "$passedKeepNativeSymbols" = true ]; then
515-
arguments+=("/p:KeepNativeSymbols=true")
516-
fi
517-
shift 2
509+
arguments+=("/p:KeepNativeSymbols=true")
510+
shift 1
518511
;;
519512

520513

0 commit comments

Comments
 (0)