| USE_SYSTEM_STDLIB = 1 | |
| ifneq "$(RESOURCE_DIR)" "" | |
| ARCH_CFLAGS += -resource-dir $(RESOURCE_DIR) | |
| endif | |
| ARCH_CXXFLAGS += \ | |
| -fno-exceptions | |
| ARCH_LDFLAGS += \ | |
| $(if $(RESOURCE_DIR),-resource-dir $(RESOURCE_DIR)) \ | |
| -Wl,--allow-undefined | |
| # Unlike most native linkers, wasm-ld garbage-collects unreferenced sections by | |
| # default, which strips globals and functions that a test wants to inspect. | |
| LDFLAGS += -Wl,--no-gc-sections | |
| # A debugger tells one build of a module from another by its build id, and | |
| # wasm-ld emits one only when asked, so a module linked without this carries | |
| # nothing that identifies it. | |
| LDFLAGS += -Wl,--build-id |