diff --git a/makefile b/makefile
index 243c450..7b1def6 100644
--- a/makefile
+++ b/makefile
@@ -55,9 +55,9 @@ GDC_VERSIONS =
 GDC_DEBUG_VERSIONS = -fversion=dparse_verbose
 
 DC_FLAGS += -Jbin
-override DMD_FLAGS += $(DFLAGS) -w -release -O -od${OBJ_DIR}
-override LDC_FLAGS += $(DFLAGS) -O5 -release -oq
-override GDC_FLAGS += $(DFLAGS) -O3 -frelease -fall-instantiations
+override DMD_FLAGS += $(DFLAGS) -od${OBJ_DIR}
+override LDC_FLAGS += $(DFLAGS) -oq
+override GDC_FLAGS += $(DFLAGS) -fall-instantiations
 
 override GDC_TEST_FLAGS += -fall-instantiations
 
@@ -66,7 +66,7 @@ override DMD_TEST_FLAGS += -w
 
 DC_DEBUG_FLAGS := -g -Jbin
 
-ifeq ($(DC), $(filter $(DC), dmd ldmd2 gdmd))
+ifneq (,$(findstring dmd, $(DC)))
 	VERSIONS := $(DMD_VERSIONS)
 	DEBUG_VERSIONS := $(DMD_DEBUG_VERSIONS)
 	DC_FLAGS += $(DMD_FLAGS)
