Try and fix macOS build, report actial error on catch
This commit is contained in:
parent
9775ad1c9d
commit
5f7347d3c9
8
Makefile
8
Makefile
@ -2,7 +2,9 @@ C_SHARED := -DLIBUS_USE_LIBUV -flto -O3 -c -fPIC -I uWebSockets/uSockets/src uWe
|
||||
|
||||
CPP_SHARED := -DLIBUS_USE_LIBUV -flto -O3 -c -fPIC -std=c++17 -I uWebSockets/uSockets/src -I uWebSockets/src src/addon.cpp
|
||||
|
||||
CPP_OSX := -stdlib=libc++ -mmacosx-version-min=10.7 -undefined dynamic_lookup
|
||||
C_OSX := -mmacosx-version-min=10.7
|
||||
|
||||
CPP_OSX := -stdlib=libc++ $(C_OSX)
|
||||
|
||||
default:
|
||||
make targets
|
||||
@ -20,7 +22,9 @@ Linux:
|
||||
g++ $(CPP_SHARED) -I $$NODE/include/node
|
||||
g++ -flto -O3 *.o -std=c++17 -shared -static-libstdc++ -static-libgcc -s -o dist/uws_linux_$$ABI.node
|
||||
Darwin:
|
||||
g++ $(CPP_SHARED) $(CPP_OSX) -I $$NODE/include/node -o dist/uws_darwin_$$ABI.node
|
||||
gcc $(C_OSX) $(C_SHARED)
|
||||
g++ $(CPP_OSX) $(CPP_SHARED) -I $$NODE/include/node
|
||||
g++ $(CPP_OSX) -flto -O3 *.o -std=c++17 -shared -undefined dynamic_lookup -o dist/uws_darwin_$$ABI.node
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f dist/README.md
|
||||
|
2
dist/uws.js
vendored
2
dist/uws.js
vendored
@ -5,6 +5,6 @@ module.exports = (() => {
|
||||
process.nextTick = (f, ...args) => uWS.nextTick(f.apply(...args));
|
||||
return uWS;
|
||||
} catch (e) {
|
||||
throw new Error('This version of µWS is not compatible with your Node.js build.');
|
||||
throw new Error('This version of µWS is not compatible with your Node.js build.\n\n' + e.toString());
|
||||
}
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user