Skip to content

Commit

Permalink
Revert "build,test: add duplicate symbol test"
Browse files Browse the repository at this point in the history
This reverts commit 2761afb.

Building with `-fvisibility=hidden` breaks some of Node's add-on tests
and therefore likely also affects third-party add-ons. This change was
landed in a patch release so I'm opting to revert it until the next
major release.

PR-URL: #1828
Refs: nodejs/node#28647 (comment)
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
  • Loading branch information
bnoordhuis committed Jul 16, 2019
1 parent 9db85ed commit c9a86fe
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 119 deletions.
4 changes: 0 additions & 4 deletions addon.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,10 @@

'conditions': [
[ 'OS=="mac"', {
'cflags': [
'-fvisibility=hidden'
],
'defines': [
'_DARWIN_USE_64_BIT_INODE=1'
],
'xcode_settings': {
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
'DYLIB_INSTALL_NAME_BASE': '@rpath'
},
}],
Expand Down
10 changes: 0 additions & 10 deletions test/node_modules/duplicate_symbols/binding.cc

This file was deleted.

19 changes: 0 additions & 19 deletions test/node_modules/duplicate_symbols/binding.gyp

This file was deleted.

37 changes: 0 additions & 37 deletions test/node_modules/duplicate_symbols/common.h

This file was deleted.

6 changes: 0 additions & 6 deletions test/node_modules/duplicate_symbols/extra.cc

This file was deleted.

5 changes: 0 additions & 5 deletions test/node_modules/duplicate_symbols/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions test/node_modules/duplicate_symbols/package.json

This file was deleted.

24 changes: 0 additions & 24 deletions test/test-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ function runHello (hostProcess) {
return execFileSync(hostProcess, [ '-e', testCode ], { cwd: __dirname }).toString()
}

function runDuplicateBindings () {
const hostProcess = process.execPath
var testCode =
'console.log((function(bindings) {' +
'return bindings.pointerCheck1(bindings.pointerCheck2());' +
"})(require('duplicate_symbols')))"
return execFileSync(hostProcess, [ '-e', testCode ], { cwd: __dirname }).toString()
}

function getEncoding () {
var code = 'import locale;print(locale.getdefaultlocale()[1])'
return execFileSync('python', [ '-c', code ]).toString().trim()
Expand Down Expand Up @@ -60,21 +51,6 @@ test('build simple addon', function (t) {
proc.stderr.setEncoding('utf-8')
})

test('make sure addon symbols do not overlap', function (t) {
t.plan(3)

var addonPath = path.resolve(__dirname, 'node_modules', 'duplicate_symbols')
// Set the loglevel otherwise the output disappears when run via 'npm test'
var cmd = [nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose']
execFile(process.execPath, cmd, function (err, stdout, stderr) {
var logLines = stderr.trim().split(/\r?\n/)
var lastLine = logLines[logLines.length - 1]
t.strictEqual(err, null)
t.strictEqual(lastLine, 'gyp info ok', 'should end in ok')
t.strictEqual(runDuplicateBindings().trim(), 'not equal')
})
})

test('build simple addon in path with non-ascii characters', function (t) {
t.plan(1)

Expand Down

0 comments on commit c9a86fe

Please sign in to comment.