Skip to content

Commit

Permalink
build: refactor os-specific scripts into different files (#175)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
joyeecheung authored Mar 18, 2018
1 parent 9eae8d7 commit cec8a7a
Show file tree
Hide file tree
Showing 5 changed files with 545 additions and 290 deletions.
Loading

0 comments on commit cec8a7a

Please sign in to comment.