diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index ca9e50f251..6a5edb34b4 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -38,7 +38,7 @@ set(BUILD_SHARED_LIBS AUTO CACHE STRING "Whet set(D_FLAGS -w;-de;-preview=dip1000;-preview=dtorfields;-preview=fieldwise CACHE STRING "Runtime D compiler flags, separated by ';'") set(D_EXTRA_FLAGS "" CACHE STRING "Runtime extra D compiler flags, separated by ';'") set(D_FLAGS_DEBUG -g;-link-defaultlib-debug;-d-debug CACHE STRING "Runtime D compiler flags (debug libraries), separated by ';'") -set(D_FLAGS_RELEASE -O3;-release;-femit-local-var-lifetime CACHE STRING "Runtime D compiler flags (release libraries), separated by ';'") +set(D_FLAGS_RELEASE -O3;-ludicrous;-femit-local-var-lifetime CACHE STRING "Runtime D compiler flags (release libraries), separated by ';'") set(COMPILE_ALL_D_FILES_AT_ONCE ON CACHE BOOL "Compile all D files for the runtime libs in a single command line instead of separately. Disabling this is useful for many CPU cores and/or iterative development.") set(RT_ARCHIVE_WITH_LDC ON CACHE STRING "Whether to archive the static runtime libs via LDC instead of CMake archiver") set(RT_CFLAGS "" CACHE STRING "Runtime extra C compiler flags, separated by ' '") diff --git a/runtime/druntime/Makefile b/runtime/druntime/Makefile index df9543950f..e87c37a2c0 100644 --- a/runtime/druntime/Makefile +++ b/runtime/druntime/Makefile @@ -106,7 +106,7 @@ ifeq ($(BUILD),debug) UDFLAGS += -g -debug DFLAGS:=$(UDFLAGS) else - UDFLAGS += -O -release + UDFLAGS += -O -ludicrous DFLAGS:=$(UDFLAGS) -inline # unittests don't compile with -inline endif diff --git a/runtime/druntime/test/common.mak b/runtime/druntime/test/common.mak index 10e3f949da..2eec034e8a 100644 --- a/runtime/druntime/test/common.mak +++ b/runtime/druntime/test/common.mak @@ -50,7 +50,7 @@ ifeq ($(BUILD),debug) DFLAGS+=-g -debug $(if $(findstring ldmd2,$(DMD)),-link-defaultlib-debug,) CFLAGS:=$(CFLAGS_BASE) $(if $(findstring $(OS),windows),/Zi,-g) else - DFLAGS+=-O -release + DFLAGS+=-O -ludicrous CFLAGS:=$(CFLAGS_BASE) $(if $(findstring $(OS),windows),/O2,-O3) endif CXXFLAGS_BASE:=$(CFLAGS_BASE) diff --git a/runtime/druntime/test/profile/Makefile b/runtime/druntime/test/profile/Makefile index 4c263336e3..dede58ca52 100644 --- a/runtime/druntime/test/profile/Makefile +++ b/runtime/druntime/test/profile/Makefile @@ -22,7 +22,7 @@ endif .PHONY: all clean all: $(addprefix $(ROOT)/,$(addsuffix .done,$(TESTS))) -# LDC: enable assertions for BUILD=RELEASE (=> `-O -release`) +# LDC: enable assertions for BUILD=RELEASE (=> `-O -ludicrous`) $(ROOT)/profile.done: DFLAGS+=-profile $(if $(findstring ldmd2,$(DMD)),-check=assert=on,) $(ROOT)/profile.done: $(ROOT)/%.done: $(ROOT)/%$(DOTEXE) @echo Testing $*