merge 46805 from amd64 branch:
[reactos.git] / reactos / tools / rbuild / backend / mingw / linkers / ld.mak
index d97e40b..d7fc3b7 100644 (file)
@@ -1,11 +1,12 @@
-LDFLAG_DLL:=-shared
-LDFLAG_DRIVER:=-shared --subsystem=native
-LDFLAG_NOSTDLIB:=-nostartfiles -nostdlib
+# -exclude-all-symbols disables autoexporting all symbols *if none were found* (either in a DEF file or using __declspec(dllexport)
+LDFLAG_DLL:=--shared --exclude-all-symbols
+LDFLAG_DRIVER:=--shared --subsystem=native --exclude-all-symbols
+LDFLAG_NOSTDLIB:=--nostartfiles --nostdlib
 LDFLAG_CONSOLE:=--subsystem=console
 LDFLAG_WINDOWS:=--subsystem=windows
 LDFLAG_NATIVE:=--subsystem=native
 
-LDFLAG_EXCLUDE_ALL_SYMBOLS=-exclude-all-symbols
+LDFLAG_EXCLUDE_ALL_SYMBOLS=--exclude-all-symbols
 DLLTOOL_FLAGS=--kill-at
 ifeq ($(ARCH),amd64)
     DLLTOOL_FLAGS= --no-leading-underscore