diff options
author | Jan Lehnardt <jan@apache.org> | 2020-01-06 14:07:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-06 14:07:13 +0100 |
commit | 05b5d063c93c1c7c73bbcb6af601b1a7f796233d (patch) | |
tree | 0045ceb5c8a2b16a667f992fd4a21e9ee4228bdc | |
parent | 3e574519474662ddbc475e79c9c7f2f8a8fb4e25 (diff) | |
download | couchdb-05b5d063c93c1c7c73bbcb6af601b1a7f796233d.tar.gz |
Fix SM60 build on Mac (#2401)
* fix: avoid segfaults, patch by @davisp
* fix: build against sm60 on mac needs extra compiler flags
-rw-r--r-- | src/couch/priv/couch_js/60/main.cpp | 3 | ||||
-rw-r--r-- | src/couch/rebar.config.script | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/couch/priv/couch_js/60/main.cpp b/src/couch/priv/couch_js/60/main.cpp index c92cfb7c9..ecedfbd3b 100644 --- a/src/couch/priv/couch_js/60/main.cpp +++ b/src/couch/priv/couch_js/60/main.cpp @@ -487,8 +487,5 @@ main(int argc, const char* argv[]) JS_MaybeGC(cx); } - JS_DestroyContext(cx); - JS_ShutDown(); - return 0; } diff --git a/src/couch/rebar.config.script b/src/couch/rebar.config.script index 267257830..a6468612c 100644 --- a/src/couch/rebar.config.script +++ b/src/couch/rebar.config.script @@ -108,6 +108,11 @@ end, "/DXP_WIN /IC:\\relax\\js-60\\js\\src", "/LIBPATH:C:\\relax\\js-60\\js\\src mozjs-60.lib" }; + {unix, darwin} when SMVsn == "60" -> + { + "-DXP_UNIX -I/usr/include/mozjs-60 -I/usr/local/include/mozjs-60 -std=c++14", + "-L/usr/local/lib -lmozjs-60 -lm -std=c++14 -lc++" + }; {unix, _} when SMVsn == "60" -> { "-DXP_UNIX -I/usr/include/mozjs-60 -I/usr/local/include/mozjs-60 -std=c++14", |