aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-03-07 18:14:40 +0100
committerMicael Karlberg <[email protected]>2019-04-30 10:58:16 +0200
commit953f39ad8ce262d1104bd7e29338e43153bbd123 (patch)
tree567e310a25877f63d3c8fded691c9f520173aa43
parentf69742b7ed7fe843f6ca44179675b9d9bc63efdc (diff)
downloadotp-953f39ad8ce262d1104bd7e29338e43153bbd123.tar.gz
otp-953f39ad8ce262d1104bd7e29338e43153bbd123.tar.bz2
otp-953f39ad8ce262d1104bd7e29338e43153bbd123.zip
[socket] Preloaded (erts) app file
The optional socket module is now not included in the app file if esock is not enabled. OTP-15658
-rw-r--r--erts/preloaded/src/Makefile21
-rw-r--r--erts/preloaded/src/erts.app.src3
2 files changed, 18 insertions, 6 deletions
diff --git a/erts/preloaded/src/Makefile b/erts/preloaded/src/Makefile
index efeb92dce9..27d450c873 100644
--- a/erts/preloaded/src/Makefile
+++ b/erts/preloaded/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2018. All Rights Reserved.
+# Copyright Ericsson AB 2008-2019. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -33,14 +33,22 @@ STATIC_EBIN=../ebin
include $(ERL_TOP)/erts/vsn.mk
include $(ERL_TOP)/lib/kernel/vsn.mk
+ifeq ($(USE_ESOCK), yes)
+PRE_LOADED_ERL_ESOCK_MODULES = \
+ socket \
+ net
+else
+PRE_LOADED_ERL_ESOCK_MODULES = \
+ net
+endif
+
PRE_LOADED_ERL_MODULES = \
erl_prim_loader \
init \
prim_buffer \
prim_file \
prim_inet \
- socket \
- net \
+ $(PRE_LOADED_ERL_ESOCK_MODULES) \
zlib \
prim_zip \
erl_init \
@@ -73,6 +81,11 @@ STATIC_TARGET_FILES = $(PRE_LOADED_MODULES:%=$(STATIC_EBIN)/%.$(EMULATOR))
APP_FILE= erts.app
APP_SRC= $(APP_FILE).src
APP_TARGET= $(STATIC_EBIN)/$(APP_FILE)
+ifeq ($(USE_ESOCK), yes)
+APP_ESOCK_MODS= net, socket
+else
+APP_ESOCK_MODS= net
+endif
KERNEL_SRC=$(ERL_TOP)/lib/kernel/src
@@ -94,7 +107,7 @@ copy:
cp *.beam $(STATIC_EBIN)
$(APP_TARGET): $(APP_SRC) $(ERL_TOP)/erts/vsn.mk
- $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' -e 's;%ESOCK_MODS%;$(APP_ESOCK_MODS);' $< > $@
include $(ERL_TOP)/make/otp_release_targets.mk
diff --git a/erts/preloaded/src/erts.app.src b/erts/preloaded/src/erts.app.src
index c2a8511b6d..132397b478 100644
--- a/erts/preloaded/src/erts.app.src
+++ b/erts/preloaded/src/erts.app.src
@@ -36,8 +36,7 @@
atomics,
counters,
zlib,
- net,
- socket
+ %ESOCK_MODS%
]},
{registered, []},
{applications, []},