diff options
author | Yiannis Tsiouris <[email protected]> | 2013-01-22 18:16:33 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-11-17 14:45:45 +0100 |
commit | eebdde01b149ea45966c7412bc2a062136457b54 (patch) | |
tree | a2d73dbb183d1ffc4a02992fb38b527538568f76 | |
parent | 277e8e77384ed6628009243e63d62f0555d10c69 (diff) | |
download | otp-eebdde01b149ea45966c7412bc2a062136457b54.tar.gz otp-eebdde01b149ea45966c7412bc2a062136457b54.tar.bz2 otp-eebdde01b149ea45966c7412bc2a062136457b54.zip |
Add --enable-sharing-preserving configure flag
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | erts/configure.in | 12 | ||||
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 3 | ||||
-rw-r--r-- | erts/emulator/beam/global.h | 5 |
4 files changed, 20 insertions, 4 deletions
diff --git a/configure.in b/configure.in index e8c8680e19..51728a847e 100644 --- a/configure.in +++ b/configure.in @@ -278,6 +278,10 @@ AC_ARG_ENABLE(builtin-zlib, AS_HELP_STRING([--enable-builtin-zlib], [force use of our own built-in zlib])) +AC_ARG_ENABLE(sharing-preserving, +AS_HELP_STRING([--enable-sharing-preserving], + [enable copying of terms without destroying sharing])) + dnl This functionality has been lost along the way... :( dnl It could perhaps be nice to reintroduce some day; therefore, dnl it is not removed just commented out. diff --git a/erts/configure.in b/erts/configure.in index 2419925c33..9ad1588b6c 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -788,6 +788,18 @@ esac AC_SUBST(LIBCARBON) +dnl Check if we should/can build a sharing-preserving emulator + +AC_MSG_CHECKING(if we are building a sharing-preserving emulator) +if test "$enable_sharing_preserving" = "yes"; then + AC_DEFINE(SHCOPY, [1], + [Define if building a sharing-preserving emulator]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + + dnl some tests below will call this if we haven't already - and autoconf dnl can't handle those tests being done conditionally at runtime AC_PROG_CPP diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index 1eb106a551..82c2aa4b9e 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -130,6 +130,9 @@ static char erts_system_version[] = ("Erlang/OTP " ERLANG_OTP_RELEASE #ifdef USE_SYSTEMTAP " [systemtap]" #endif +#ifdef SHCOPY + " [sharing-preserving]" +#endif "\n"); #define ASIZE(a) (sizeof(a)/sizeof(a[0])) diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index 303b9ee51b..3c59df5f41 100644 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -1038,12 +1038,9 @@ void erl_error(char*, va_list); /* This controls whether sharing-preserving copy is used by Erlang */ +#ifdef SHCOPY #define SHCOPY_SEND #define SHCOPY_SPAWN - -#if defined(SHCOPY_SEND) \ - || defined(SHCOPY_SPAWN) -#define SHCOPY /* Use this if you want sharing-preserving copy to be initially disabled */ #undef SHCOPY_DISABLE #endif |