Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: refactor os-specific scripts into different files #175

Merged
merged 1 commit into from
Mar 18, 2018

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Mar 16, 2018

This patch refactors all the OS-specific configuration scripts
into separate files:

  • scripts/linux.js for Linux
  • scripts/darwin.js for macOS
  • scripts/freebsd.js for FreeBSD

And put lldb-specific code into scripts/lldb.js.
The scripts/configure.js now runs a main() function
that calls other functions so the configuration code
is now more readable.

Also adds comments in the configuration scripts
and more console outputs during the installation
to help users find issues about their installation.

Tested with the following combinations (with npm install):

  • macOS 10.12 + Xcode 9.2
  • macOS 10.12 + lldb 5.0 (installed with brew install --with-lldb --with-toolchain llvm)
  • Ubuntu 16.04 + lldb 4.0 (apt-get install lldb-4.0 liblldb-4.0-dev)
  • FreeBSD 11 + lldb40 (comes with lldb40, need to pkg install llvm40 to install the headers)
  • FreeBSD 11 + lldb50 (pkg install llvm50 and relink /usr/bin/lldb to /usr/local/bin/lldb50)
  • CentOS 7 + lldb 4.0 from llvm-toolset-7 in the SCL
  • Fedora + lldb 5.0

mmarchini

This comment was marked as off-topic.

richardlau

This comment was marked as off-topic.

@joyeecheung
Copy link
Member Author

@richardlau Updated, PTAL, thanks!

@joyeecheung
Copy link
Member Author

I also tested Fedora 27 with lldb 5.0. This is what I used to do the testing:

https://gist.github.com/joyeecheung/f458f9a668e0e9546d48d899298e7331

richardlau

This comment was marked as off-topic.

This patch refactors all the OS-specific configuration scripts
into separate files:

- `scripts/linux.js` for Linux
- `scripts/darwin.js` for macOS
- `scripts/freebsd.js` for FreeBSD

And put lldb-specific code into `scripts/lldb.js`.
The `scripts/configure.js` now runs a `main()` function
that calls other functions so the configuration code
is now more readable.

Also adds comments in the configuration scripts
and more console outputs during the installation
to help users find issues about their installation.

Tested with the following combinations (with `npm install`):

- macOS 10.12 + Xcode 9.2
- macOS 10.12 + lldb 5.0 (installed with `brew install --with-lldb --with-toolchain llvm`)
- Ubuntu 16.04 + lldb 4.0 (`apt-get install lldb-4.0 liblldb-4.0-dev`)
- FreeBSD 11 + lldb40 (comes with lldb40, need to `pkg install llvm40` to install the headers)
- FreeBSD 11 + lldb50 (`pkg install llvm50` and relink `/usr/bin/lldb` to `/usr/local/bin/lldb50`)
- CentOS 7 + lldb 4.0 from llvm-toolset-7 in the SCL
- Fedora 27 + lldb 5.0 has been tested.
@joyeecheung
Copy link
Member Author

Rebased and squashed to see if we have any luck to get a green CI with #176 landed

@joyeecheung
Copy link
Member Author

CI is green, merging...

@joyeecheung joyeecheung merged commit cec8a7a into nodejs:master Mar 18, 2018
@joyeecheung joyeecheung mentioned this pull request Mar 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants