-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: compile in ISO C++11 mode #37
Conversation
@aqrln, maybe it is possible to completely avoid providing |
@belochub yeah, that sounds reasonable. |
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`.
@belochub updated |
@aqrln LGTM |
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: #37
CI passing (which is good since I only tested on Clang, not GCC), landed in 08516fd. |
@belochub btw, are there versions of GCC (and if there are, which is the last of them) that support |
@aqrln, yes, there are: GCC from 4.3 till 4.6 only had option
Which means that it is better to avoid compiling C++11 programs on GCC versions earlier than 4.8.1 because even with |
@belochub, ah, and GCC 4.8+ is a requirement for building Node.js addons. So this change will not break a build on some Debian or CentOS 6, which I was afraid of. |
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: #37
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: #37
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: #37
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: #37
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: #37
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: #37
This is a new and shiny first major release for `metarhia-jstp`. Changes include API refactoring and improvements, implementations of CLI, sessions, and application versions, native addon build optimizations, lots of bug fixes, test coverage increase, and other, less notable changes. This release also denotes the bump of the protocol version to v1.0. The only difference from the previous version of the protocol is that "old" heartbeat messages (`{}`) are now deprecated and `ping`/`pong` messages must be used for this purpose instead. Notable changes: * **src,build:** improve the native module subsystem *(Alexey Orlenko)* [#36](#36) **\[semver-minor\]** * **build:** compile in ISO C++11 mode *(Alexey Orlenko)* [#37](#37) **\[semver-minor\]** * **build:** improve error handling *(Alexey Orlenko)* [#40](#40) **\[semver-minor\]** * **lib:** refactor record-serialization.js *(Alexey Orlenko)* [#41](#41) **\[semver-minor\]** * **protocol:** change the format of handshake packets *(Alexey Orlenko)* [#54](#54) **\[semver-major\]** * **parser:** remove special case for '\0' literal *(Mykola Bilochub)* [#68](#68) **\[semver-major\]** * **client:** drop redundant callback argument *(Alexey Orlenko)* [#104](#104) **\[semver-major\]** * **client:** handle errors in connectAndInspect *(Alexey Orlenko)* [#105](#105) **\[semver-major\]** * **socket,ws:** use socket.destroy() properly *(Alexey Orlenko)* [#84](#84) **\[semver-major\]** * **cli:** add basic implementation *(Mykola Bilochub)* [#107](#107) **\[semver-minor\]** * **connection:** fix error handling in optional cbs *(Alexey Orlenko)* [#147](#147) **\[semver-major\]** * **lib:** change event signature *(Denys Otrishko)* [#187](#187) **\[semver-major\]** * **lib:** add address method to Server *(Denys Otrishko)* [#190](#190) **\[semver-minor\]** * **lib:** optimize connection events *(Denys Otrishko)* [#222](#222) **\[semver-major\]** * **lib:** refactor server and client API *(Denys Otrishko)* [#209](#209) **\[semver-major\]** * **lib,src:** rename term packet usages to message *(Denys Otrishko)* [#270](#270) **\[semver-major\]** * **lib:** emit events about connection messages *(Denys Otrishko)* [#252](#252) **\[semver-minor\]** * **connection:** make callback method private *(Alexey Orlenko)* [#306](#306) **\[semver-major\]** * **lib:** implement sessions *(Mykola Bilochub)* [#289](#289) **\[semver-major\]** * **connection:** use ping-pong instead of heartbeat *(Dmytro Nechai)* [#303](#303) **\[semver-major\]**
This is a new and shiny first major release for `metarhia-jstp`. Changes include API refactoring and improvements, implementations of CLI, sessions, and application versions, native addon build optimizations, lots of bug fixes, test coverage increase, and other, less notable changes. This release also denotes the bump of the protocol version to v1.0. The only difference from the previous version of the protocol is that "old" heartbeat messages (`{}`) are now deprecated and `ping`/`pong` messages must be used for this purpose instead. Notable changes: * **src,build:** improve the native module subsystem *(Alexey Orlenko)* [#36](#36) **\[semver-minor\]** * **build:** compile in ISO C++11 mode *(Alexey Orlenko)* [#37](#37) **\[semver-minor\]** * **build:** improve error handling *(Alexey Orlenko)* [#40](#40) **\[semver-minor\]** * **lib:** refactor record-serialization.js *(Alexey Orlenko)* [#41](#41) * **parser:** fix a possible memory leak *(Alexey Orlenko)* [#44](#44) **\[semver-minor\]** * **protocol:** change the format of handshake packets *(Alexey Orlenko)* [#54](#54) **\[semver-major\]** * **parser:** make parser single-pass *(Mykola Bilochub)* [#61](#61) * **parser:** remove special case for '\0' literal *(Mykola Bilochub)* [#68](#68) **\[semver-major\]** * **parser:** fix bug causing node to crash *(Mykola Bilochub)* [#75](#75) * **client:** drop redundant callback argument *(Alexey Orlenko)* [#104](#104) **\[semver-major\]** * **client:** handle errors in connectAndInspect *(Alexey Orlenko)* [#105](#105) **\[semver-major\]** * **socket,ws:** use socket.destroy() properly *(Alexey Orlenko)* [#84](#84) **\[semver-major\]** * **cli:** add basic implementation *(Mykola Bilochub)* [#107](#107) **\[semver-minor\]** * **connection:** fix error handling in optional cbs *(Alexey Orlenko)* [#147](#147) **\[semver-major\]** * **test:** add JSON5 specs test suite *(Alexey Orlenko)* [#158](#158) * **lib:** change event signature *(Denys Otrishko)* [#187](#187) **\[semver-major\]** * **lib:** add address method to Server *(Denys Otrishko)* [#190](#190) **\[semver-minor\]** * **parser:** implement NaN and Infinity parsing *(Mykola Bilochub)* [#201](#201) * **parser:** improve string parsing performance *(Mykola Bilochub)* [#220](#220) * **lib:** optimize connection events *(Denys Otrishko)* [#222](#222) **\[semver-major\]** * **lib:** refactor server and client API *(Denys Otrishko)* [#209](#209) **\[semver-major\]** * **lib,src:** rename term packet usages to message *(Denys Otrishko)* [#270](#270) **\[semver-major\]** * **lib:** emit events about connection messages *(Denys Otrishko)* [#252](#252) **\[semver-minor\]** * **lib:** implement API versioning *(Denys Otrishko)* [#231](#231) **\[semver-minor\]** * **lib:** allow to set event handlers in application *(Denys Otrishko)* [#286](#286) **\[semver-minor\]** * **lib:** allow to broadcast events from server *(Denys Otrishko)* [#287](#287) **\[semver-minor\]** * **connection:** make callback method private *(Alexey Orlenko)* [#306](#306) **\[semver-major\]** * **lib:** implement sessions *(Mykola Bilochub)* [#289](#289) **\[semver-major\]** * **connection:** use ping-pong instead of heartbeat *(Dmytro Nechai)* [#303](#303) **\[semver-major\]**
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: metarhia/jstp#37
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: metarhia/jstp#37
* Use `cflags_cc` instead of `cflags`. * By default `node-gyp` uses `-std=gnu++0x`. This commit modifies `cflags_cc` to use `-std=c++11`. PR-URL: metarhia/jstp#37
By default
node-gyp
uses-std=gnu++0x
. This commit modifiescflags
to use-std=c++11
.@belochub there's a question we need to resolve. For the sake of simplicity I placed
-std=c++11
tocflags
GYP variable that is applied both to C and C++ sources. Currently it has no side-effects since we have no pure-C sources, and most likely won't have such. Technically it would be more correct to place it intocflags_cc
and makecflags_cc
inheritcflags
explicitly (because strangelycflags
change their behavior and get ignored in generated C++ flags in*.target.mk
if there arecflags_cc
present inbinding.gyp
), but it will result in quite more complexbinding.gyp
.