MatrixAI / js-db

Key-Value DB for TypeScript and JavaScript Applications
https://polykey.com
Apache License 2.0
5 stars 0 forks source link

Clean up superfluous compilation flags #43

Open CMCDragonkai opened 1 year ago

CMCDragonkai commented 1 year ago

Specification

The current gyp files specify compilation flags in such a way that it leads to repeated superfluous flags.

But I did notice that the compilation settings are a bit messy, worth looking into cleaning it up so it's clearer. Messy settings include multiple overrides of -std and -stdlib, and -mmacosx-version-min and -arch. It's also not entirely consistent between the deps and this js-db's native binding.

Basically I believe flags/options like -std, -stdlib, and -mmacosx-version-min and -arch should be configured so there's not so much repetition.

This has to do with the way our binding.gyp is specifying the compilation options. The gyp format has a lot of ways of doing things, and it is likely some options are being "appended", where we should actually override existing options, rather than just appending new options.

At the same time, the node-gyp sort of combines the gyp files with configuration coming from the default gyp file that is in nodejs itself, and that can be a source of problems.

Additional context

Tasks

  1. ...
  2. ...
  3. ...