Skip to content

Commit

Permalink
R3.0.0 release (#437)
Browse files Browse the repository at this point in the history
* update requirements documentation

* initial port to 8.0.23

* some cleanup of makefiles

* pushing further

* preparations toward 3.0 release
  • Loading branch information
JerrySievert committed May 29, 2021
1 parent 3656177 commit 977712a
Show file tree
Hide file tree
Showing 17 changed files with 1,689 additions and 151 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT
@@ -1,4 +1,4 @@
Copyright (c) 2009-2012, the PLV8JS Development Group.
Copyright (c) 2009-2021, the PLV8JS Development Group.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose, without fee, and without a written agreement
Expand Down
19 changes: 9 additions & 10 deletions META.json
Expand Up @@ -2,7 +2,7 @@
"name": "plv8",
"abstract": "A procedural language in JavaScript powered by V8",
"description": "plv8 is a trusted procedural language that is safe to use, fast to run and easy to develop.",
"version": "3.0alpha",
"version": "3.0.0",
"maintainer": [
"Jerry Sievert <code@legitimatesounding.com>"
],
Expand All @@ -13,31 +13,30 @@
"prereqs": {
"runtime": {
"requires": {
"v8": "5.8.301",
"PostgreSQL": "8.4.0"
"PostgreSQL": "9.6.0"
},
"recommends": {
"PostgreSQL": "9.6.0"
"PostgreSQL": "13"
}
}
},
"provides": {
"plv8": {
"file": "plv8--3.0alpha.sql",
"file": "plv8--3.0.0.sql",
"docfile": "docs/PGXN.md",
"version": "3.0alpha",
"version": "3.0.0",
"abstract": "A procedural language in JavaScript"
},
"plcoffee": {
"file": "plcoffee--3.0alpha.sql",
"file": "plcoffee--3.0.0.sql",
"docfile": "docs/PGXN.md",
"version": "3.0alpha",
"version": "3.0.0",
"abstract": "A procedural language in CoffeeScript"
},
"plls": {
"file": "plls--3.0alpha.sql",
"file": "plls--3.0.0.sql",
"docfile": "docs/PGXN.md",
"version": "3.0alpha",
"version": "3.0.0",
"abstract": "A procedural language in LiveScript"
}
},
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Expand Up @@ -29,16 +29,17 @@ else
endif
endif

AUTOV8_VERSION = 7.4.288.28
AUTOV8_VERSION = 8.6.405
AUTOV8_DIR = build/v8
AUTOV8_OUT = build/v8/out.gn/$(PLATFORM)/obj
AUTOV8_DEPOT_TOOLS = build/depot_tools
AUTOV8_LIB = $(AUTOV8_OUT)/libv8_snapshot.a
AUTOV8_STATIC_LIBS = -lv8_base -lv8_snapshot -lv8_libplatform -lv8_libbase -lv8_libsampler
AUTOV8_STATIC_LIBS = -lv8_monolith
export PATH := $(abspath $(AUTOV8_DEPOT_TOOLS)):$(PATH)

SHLIB_LINK += -L$(AUTOV8_OUT) -L$(AUTOV8_OUT)/third_party/icu $(AUTOV8_STATIC_LIBS)
V8_OPTIONS = is_component_build=false v8_static_library=true v8_use_snapshot=true v8_use_external_startup_data=false use_custom_libcxx=false
V8_OPTIONS = use_custom_libcxx=false v8_monolithic=true v8_use_external_startup_data=false is_component_build=false is_debug=true


ifndef USE_ICU
V8_OPTIONS += v8_enable_i18n_support=false
Expand Down Expand Up @@ -73,7 +74,7 @@ $(AUTOV8_DIR): $(AUTOV8_DEPOT_TOOLS)
cd build; fetch v8; cd v8; git checkout $(AUTOV8_VERSION); gclient sync

# patch v8 with our clang and gn
cd build/v8; rm -r third_party/llvm-build/Release+Asserts/; mv ../clang+llvm-7.0.1-aarch64-linux-gnu third_party/llvm-build/Release+Asserts; cp ../gn/out/gn buildtools/linux64/gn;
cd build/v8; rm -r third_party/llvm-build/Release+Asserts/; mv ../clang+llvm-7.0.1-aarch64-linux-gnu third_party/llvm-build/Release+Asserts; cp ../gn/out/gn buildtools/linux64/gn;

cd build/v8; sed -i -e "s/target_cpu=\"x64\" v8_target_cpu=\"arm64/target_cpu=\"arm64\" v8_target_cpu=\"arm64/" infra/mb/mb_config.pyl; tools/dev/v8gen.py $(PLATFORM) -- $(V8_OPTIONS)
else
Expand All @@ -86,7 +87,7 @@ $(AUTOV8_OUT)/third_party/icu/common/icudtb.dat:
$(AUTOV8_OUT)/third_party/icu/common/icudtl.dat:

v8: $(AUTOV8_DIR)
cd $(AUTOV8_DIR) ; env CXXFLAGS=-fPIC CFLAGS=-fPIC ninja -C out.gn/$(PLATFORM) d8
cd $(AUTOV8_DIR) ; env CXXFLAGS=-fPIC CFLAGS=-fPIC ninja -C out.gn/$(PLATFORM) v8_monolith

include Makefile.shared

Expand All @@ -101,6 +102,8 @@ endif
# enable direct jsonb conversion by default
CCFLAGS += -DJSONB_DIRECT_CONVERSION

CCFLAGS += -DV8_COMPRESS_POINTERS=1 -DV8_31BIT_SMIS_ON_64BIT_ARCH=1

CCFLAGS += -I$(AUTOV8_DIR)/include -I$(AUTOV8_DIR)
# We're gonna build static link. Rip it out after include Makefile
SHLIB_LINK := $(filter-out -lv8, $(SHLIB_LINK))
Expand Down
6 changes: 3 additions & 3 deletions Makefile.shared
Expand Up @@ -12,7 +12,7 @@
# 'make' will download v8 and build, then statically link to it.
#
#-----------------------------------------------------------------------------#
PLV8_VERSION = 3.0alpha
PLV8_VERSION = 3.0.0

PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
Expand Down Expand Up @@ -71,9 +71,9 @@ endif
# for older g++ (e.g. 4.6.x), which do not support c++11
#OPTFLAGS = -O2 -std=gnu++0x -fno-rtti

OPTFLAGS = -std=c++11 -fno-rtti -O2
OPTFLAGS = -std=c++11 -fno-rtti -O2 -g

CCFLAGS = -Wall $(OPTFLAGS) $(OPT_ENABLE_DEBUGGER_SUPPORT)
CCFLAGS = -Wall $(OPTFLAGS) $(OPT_ENABLE_DEBUGGER_SUPPORT) -g

ifdef V8_SRCDIR
override CPPFLAGS += -I$(V8_SRCDIR) -I$(V8_SRCDIR)/include
Expand Down
10 changes: 5 additions & 5 deletions docs/BUILDING.md
Expand Up @@ -22,9 +22,9 @@ is not meant to be an exhaustive list.
Downloading the source code is very straightforward:

```
$ wget https://github.com/plv8/plv8/archive/v2.3.15.tar.gz
$ tar -xvzf v2.3.15.tar.gz
$ cd plv8-2.3.15
$ wget https://github.com/plv8/plv8/archive/v3.0.0.tar.gz
$ tar -xvzf v3.0.0.tar.gz
$ cd plv8-3.0.0
$ make
```

Expand All @@ -41,7 +41,7 @@ This will download `v8` and compile it as well.
| Note: If you have multiple versions of PostgreSQL installed like 9.5 and 9.6, Plv8 will only be built for PostgreSQL 9.6. This is because make calls pg_config to get the version number, which will always be the latest version installed. If you need to build Plv8 for PostgreSQL 9.5 while you have 9.6 installed pass make the PG_CONFIG variable to your 9.5 version of pg_config. This works for `make`, and `make install`. For example in Ubuntu:

```
$ make PG_CONFIG=/usr/lib/postgresql/9.5/bin/pg_config
$ make PG_CONFIG=/usr/lib/postgresql/13/bin/pg_config
```

### Building with Execution Timeout
Expand Down Expand Up @@ -173,7 +173,7 @@ This will build and package the extension for installation.

To install, you simply need to `unzip` the file created. The name will depend
on the version of PLV8 and the version of Postgres. An example is
`plv8-2.3.1-postgresql-10-x64.zip`.
`plv8-3.0.0-postgresql-10-x64.zip`.

# Build FAQ

Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Expand Up @@ -4,7 +4,7 @@ PLV8 is a _trusted_ Javascript language extension for PostgreSQL. It can be
used for _stored procedures_, _triggers_, etc.

PLV8 works with most versions of Postgres, but works best with `9.1` and above,
including `10.0` and `11`.
including `10.0`, `11`, `12`, and `13`.

## Installing PLV8

Expand Down Expand Up @@ -33,10 +33,10 @@ Alternately, you can run the following on all versions of PLV8:
## Updating PLV8

As of PLV8 version `2.3.3`, you can use upgrade scripts to upgrade your
installation from any verion higher than `1.5.0`:
installation from any version higher than `1.5.0`:

```
=# ALTER EXTENSION plv8 UPDATE TO `2.3.8`;
=# ALTER EXTENSION plv8 UPDATE TO `3.0.0`;
```

Note that until the database has been restarted, the old version of PLV8 will
Expand Down

0 comments on commit 977712a

Please sign in to comment.