Skip to content

Commit 0878db3

Browse files
bnoordhuisrvagg
authored andcommitted
Revert "build,test: add duplicate symbol test"
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 <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
1 parent 66ad305 commit 0878db3

File tree

8 files changed

+0
-119
lines changed

8 files changed

+0
-119
lines changed

addon.gypi

-4
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,10 @@
9090

9191
'conditions': [
9292
[ 'OS=="mac"', {
93-
'cflags': [
94-
'-fvisibility=hidden'
95-
],
9693
'defines': [
9794
'_DARWIN_USE_64_BIT_INODE=1'
9895
],
9996
'xcode_settings': {
100-
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
10197
'DYLIB_INSTALL_NAME_BASE': '@rpath'
10298
},
10399
}],

test/node_modules/duplicate_symbols/binding.cc

-10
This file was deleted.

test/node_modules/duplicate_symbols/binding.gyp

-19
This file was deleted.

test/node_modules/duplicate_symbols/common.h

-37
This file was deleted.

test/node_modules/duplicate_symbols/extra.cc

-6
This file was deleted.

test/node_modules/duplicate_symbols/index.js

-5
This file was deleted.

test/node_modules/duplicate_symbols/package.json

-14
This file was deleted.

test/test-addon.js

-24
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ function runHello (hostProcess) {
1818
return execFileSync(hostProcess, [ '-e', testCode ], { cwd: __dirname }).toString()
1919
}
2020

21-
function runDuplicateBindings () {
22-
const hostProcess = process.execPath
23-
var testCode =
24-
'console.log((function(bindings) {' +
25-
'return bindings.pointerCheck1(bindings.pointerCheck2());' +
26-
"})(require('duplicate_symbols')))"
27-
return execFileSync(hostProcess, [ '-e', testCode ], { cwd: __dirname }).toString()
28-
}
29-
3021
function getEncoding () {
3122
var code = 'import locale;print(locale.getdefaultlocale()[1])'
3223
return execFileSync('python', [ '-c', code ]).toString().trim()
@@ -60,21 +51,6 @@ test('build simple addon', function (t) {
6051
proc.stderr.setEncoding('utf-8')
6152
})
6253

63-
test('make sure addon symbols do not overlap', function (t) {
64-
t.plan(3)
65-
66-
var addonPath = path.resolve(__dirname, 'node_modules', 'duplicate_symbols')
67-
// Set the loglevel otherwise the output disappears when run via 'npm test'
68-
var cmd = [nodeGyp, 'rebuild', '-C', addonPath, '--loglevel=verbose']
69-
execFile(process.execPath, cmd, function (err, stdout, stderr) {
70-
var logLines = stderr.trim().split(/\r?\n/)
71-
var lastLine = logLines[logLines.length - 1]
72-
t.strictEqual(err, null)
73-
t.strictEqual(lastLine, 'gyp info ok', 'should end in ok')
74-
t.strictEqual(runDuplicateBindings().trim(), 'not equal')
75-
})
76-
})
77-
7854
test('build simple addon in path with non-ascii characters', function (t) {
7955
t.plan(1)
8056

0 commit comments

Comments
 (0)