Skip to content

[0.7] Fix build errors, node14 compatability #178

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

Open
wants to merge 11 commits into
base: v0.7.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,37 @@ matrix:
osx_image: xcode11
env: BUILDTYPE=release
node_js: 12
# Sanitizer build node v14/Debug
- os: linux
env: BUILDTYPE=debug TOOLSET=asan CXXFLAGS="-fext-numeric-literals"
node_js: 14
sudo: required
# Overrides `install` to set up custom asan flags
install:
- ./scripts/setup.sh --config local.env
# put mason and clang++ on PATH
- source local.env
# Note: to build without stopping on errors remove the -fno-sanitize-recover=all flag
# You might want to do this if there are multiple errors and you want to see them all before fixing
- export CXXFLAGS="${MASON_SANITIZE_CXXFLAGS} -fno-sanitize-recover=all"
- export LDFLAGS="${MASON_SANITIZE_LDFLAGS}"
- make ${BUILDTYPE}
# Overrides `script` to disable asan LD_PRELOAD before publishing
before_script:
- export LD_PRELOAD=${MASON_LLVM_RT_PRELOAD}
- export ASAN_OPTIONS=fast_unwind_on_malloc=0:${ASAN_OPTIONS}
- npm test
- unset LD_PRELOAD
# after successful tests, publish binaries if specified in commit message
- ./scripts/publish.sh --toolset=${TOOLSET:-} --debug=$([ "${BUILDTYPE}" == 'debug' ] && echo "true" || echo "false")
script:
- true
# Overrides `install` to avoid initializing clang toolchain
install:
- make ${BUILDTYPE}
# Overrides `script` to disable publishing
before_script:
- npm test
# Sanitizer build node v12/Debug
- os: linux
env: BUILDTYPE=debug TOOLSET=asan CXXFLAGS="-fext-numeric-literals"
Expand Down
2 changes: 1 addition & 1 deletion bench/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var path = require('path');
var fontnik = require('../');
var queue = require('queue-async');
var queue = require('d3-queue');
var fs = require('fs');

// https://gist.github.com/mourner/96b1335c6a43e68af252
Expand Down
2 changes: 1 addition & 1 deletion bin/build-glyphs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var fontnik = require('../index.js');
var path = require('path');
var fs = require('fs');
var queue = require('queue-async');
var queue = require('d3-queue');

if (process.argv.length !== 4) {
console.log('Usage:');
Expand Down
2 changes: 1 addition & 1 deletion bin/font-inspect
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var path = require('path');
var fs = require('fs');
var queue = require('queue-async');
var queue = require('d3-queue');
var glob = require('glob');
var argv = require('minimist')(process.argv.slice(2), {
boolean: ['verbose', 'help']
Expand Down
13 changes: 10 additions & 3 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
'target_defaults': {
'default_configuration': 'Release',
'cflags_cc' : [
'-std=c++14',
'-std=gnu++14',
'-Wno-error=effc++',
'-fno-exceptions',
# The assumption is that projects based on node-cpp-skel will also
# depend on mason packages. Currently (this will change in future mason versions)
# mason packages default to being built/linked with the CXX11_ABI=0.
Expand All @@ -12,7 +14,12 @@
# More details at https://github.com/mapbox/mason/issues/319
'-D_GLIBCXX_USE_CXX11_ABI=0'
],
'cflags_cc!': ['-std=gnu++0x','-fno-rtti', '-fno-exceptions'],
'cflags_cc!': [
'-std=gnu++0x',
'-fno-rtti',
'-D_GLIBCXX_USE_CXX11_ABI=0',
'-fno-exceptions'
],
'configurations': {
'Debug': {
'defines!': [
Expand Down Expand Up @@ -50,4 +57,4 @@
}
}
}
}
}
Loading