Skip to content

Commit 5f7347d

Browse files
committed
Try and fix macOS build, report actial error on catch
1 parent 9775ad1 commit 5f7347d

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎Makefile‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ C_SHARED := -DLIBUS_USE_LIBUV -flto -O3 -c -fPIC -I uWebSockets/uSockets/src uWe
22

33
CPP_SHARED := -DLIBUS_USE_LIBUV -flto -O3 -c -fPIC -std=c++17 -I uWebSockets/uSockets/src -I uWebSockets/src src/addon.cpp
44

5-
CPP_OSX := -stdlib=libc++ -mmacosx-version-min=10.7 -undefined dynamic_lookup
5+
C_OSX := -mmacosx-version-min=10.7
6+
7+
CPP_OSX := -stdlib=libc++ $(C_OSX)
68

79
default:
810
make targets
@@ -20,7 +22,9 @@ Linux:
2022
g++ $(CPP_SHARED) -I $$NODE/include/node
2123
g++ -flto -O3 *.o -std=c++17 -shared -static-libstdc++ -static-libgcc -s -o dist/uws_linux_$$ABI.node
2224
Darwin:
23-
g++ $(CPP_SHARED) $(CPP_OSX) -I $$NODE/include/node -o dist/uws_darwin_$$ABI.node
25+
gcc $(C_OSX) $(C_SHARED)
26+
g++ $(CPP_OSX) $(CPP_SHARED) -I $$NODE/include/node
27+
g++ $(CPP_OSX) -flto -O3 *.o -std=c++17 -shared -undefined dynamic_lookup -o dist/uws_darwin_$$ABI.node
2428
.PHONY: clean
2529
clean:
2630
rm -f dist/README.md

‎dist/uws.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ module.exports = (() => {
55
process.nextTick = (f, ...args) => uWS.nextTick(f.apply(...args));
66
return uWS;
77
} catch (e) {
8-
throw new Error('This version of µWS is not compatible with your Node.js build.');
8+
throw new Error('This version of µWS is not compatible with your Node.js build.\n\n' + e.toString());
99
}
1010
})();

0 commit comments

Comments
 (0)