Files
tinygo/builder
deadprogram 1a1506ef79 builder,loader: fix -ldflags -X not overriding variables with default values
When a string variable already had a source-level default value, the -ldflags
"-X" flag was silently ignored and the variable remained the default value
at runtime.

Fix by stripping the InitOrder entry for each -X variable before
LoadSSA() is called. With no entry in InitOrder, go/ssa emits no init
store, so the global stays zero-valued in the IR. makeGlobalsModule
still injects the actual -X values at final link time.

The -X values remain out of the per-package build cache with only the
variable names appearing in the cache key.

Signed-off-by: deadprogram <ron@hybridgroup.com>
2026-04-28 11:06:48 +01:00
..
2025-10-03 15:46:25 +02:00
2025-11-24 12:11:47 +01:00
2025-06-13 14:42:23 +02:00
2025-09-17 05:28:06 -04:00
2026-04-17 10:33:07 +02:00
2023-02-26 19:22:10 +01:00
2025-09-17 05:28:06 -04:00
2026-04-11 12:38:36 +01:00
2025-11-24 12:11:47 +01:00
2024-09-24 17:42:30 +01:00
2025-06-13 14:42:23 +02:00
2025-06-13 14:42:23 +02:00
2025-06-13 14:42:23 +02:00
2024-12-19 15:08:37 +01:00
2025-06-13 14:42:23 +02:00
2025-06-13 14:42:23 +02:00