Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Change node module buildsystem to @mapbox/cmake-node-module - #11913

Merged
kkaefer merged 2 commits into
masterfrom
node
May 22, 2018
Merged

kkaefer merged 2 commits into
masterfrom
node

Conversation

@kkaefer

@kkaefer kkaefer commented May 15, 2018

Copy link
Copy Markdown
Member

Other Node module build scripts like node-gyp, node-cmake, and cmake-js are exclusively building the Node module for the currently active Node version. However, there's no need to even have a particular Node version installed, since those build scripts download the required headers as a separate zip file anyway. I worked on @mapbox/cmake-node-module, which supports building modules for multiple Node ABIs in the same build system. The goal of this is to reduce the number of our CI builds by building all ABIs at once (the bulk of the build is to compile core anyway, not the Node module), then fanning out to test with different Node versions.

This PR contains the first half of this change and updates the Node build scripts, but doesn't change any Circle CI builds. In the next step, we should:

  • Merge macos-release-node4 and macos-release-node6, as well as node4-clang39-release and node6-clang39-release
  • Separate the building from the testing stage using Circle CI workflows, potentially redesigning our Docker images to only include the necessary components for each step
  • Redistribute our builds to various different compilers/buildtypes. They can all build Node modules; there's no need to separate Node builds from non-Node builds. We can have one build that produces the binaries, then trigger 2 builds that run the unit tests, and render tests respectively.

@jfirebaugh jfirebaugh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


macro(mbgl_platform_node)
target_link_libraries(mbgl-node
PRIVATE "-Wl,-bind_at_load"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't included in @mapbox/cmake-node-module. Are we giving up on it? Was useful for catching undefined symbols early.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't see that. 👍

return options;
}

class RenderRequest : public Nan::AsyncResource {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #11288 / replaces #11316?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. #11316 will probably work too, but the purpose of AsyncResource is to capture the execution context of when the async callback was requested, which is that this change is doing.

@brunoabinader brunoabinader left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants