Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions .github/workflows/test-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ jobs:
apt-get install -y lsb-release wget software-properties-common gnupg
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
./llvm.sh 18 # install LLVM version 18
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-18 18
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 18
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 18
./llvm.sh 19 # SpiderMonkey at the current mozcentral.version pin requires clang/llvm >= 19 (confirmed via its own configure error)
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-19 19
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 19
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 19
clang --version
clang++ --version
- name: Setup Python
Expand Down Expand Up @@ -238,9 +238,30 @@ jobs:
if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Linux
sudo apt-get update -y
sudo apt-get install -y cmake llvm
# SpiderMonkey's headers now require clang/llvm >= 19 and
# libstdc++ >= 10 to compile against (same requirement as the
# build-spidermonkey job) -- this job's default toolchain
# (ubuntu:20.04's stock gcc-9) doesn't meet it.
sudo apt-get install -y lsb-release wget software-properties-common gnupg
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-19 19
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 19
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 19
sudo apt-get install -y libstdc++-10-dev
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
elif [[ "$OSTYPE" == "darwin"* ]]; then # macOS
brew update || true # allow failure
brew install cmake pkg-config wget unzip coreutils # `coreutils` installs the `realpath` command
# Xcode's bundled clang is older than SpiderMonkey's own
# minimum (>=19) -- same fix as setup.sh's macOS branch. Pinned
# to llvm@19: the unversioned `llvm` formula (currently 23.x)
# has no bottle for Intel macOS or macOS 14, so it silently
# falls back to a multi-hour from-source build here.
brew install llvm@19
echo "PATH=$(brew --prefix llvm@19)/bin:$PATH" >> $GITHUB_ENV
fi
echo "Installing python deps"
poetry self add "poetry-dynamic-versioning[plugin]"
Expand All @@ -255,10 +276,10 @@ jobs:
run: |
sudo apt-get install -y graphviz
# the newest version in Ubuntu 20.04 repository is 1.8.17, but we need Doxygen 1.9 series
wget -c -q https://www.doxygen.nl/files/doxygen-1.9.7.linux.bin.tar.gz
tar xf doxygen-1.9.7.linux.bin.tar.gz
cd doxygen-1.9.7 && sudo make install && cd -
rm -rf doxygen-1.9.7 doxygen-1.9.7.linux.bin.tar.gz
wget -c -q https://www.doxygen.nl/files/doxygen-1.15.0.linux.bin.tar.gz
tar xf doxygen-1.15.0.linux.bin.tar.gz
cd doxygen-1.15.0 && sudo make install && cd -
rm -rf doxygen-1.15.0 doxygen-1.15.0.linux.bin.tar.gz
BUILD_DOCS=1 BUILD_TYPE=None poetry install
- name: Upload Doxygen-generated docs as CI artifacts
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python_version == '3.11' }}
Expand Down
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(FetchContent)

if (WIN32)
SET(COMPILE_FLAGS "/GR- /W0")
# This build doesn't go through Mozilla's moz.build system, which
# normally defines XP_WIN on Windows -- without it, SpiderMonkey headers
# that branch on it (e.g. PlatformMutex.h) fall through to a POSIX path
# that doesn't exist here.
SET(COMPILE_FLAGS "/GR- /W0 /DXP_WIN")

SET(OPTIMIZED "/O2")
SET(UNOPTIMIZED "/Od")
Expand All @@ -39,7 +43,13 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
SET(PROFILE "/PROFILE")
SET(ADDRESS_SANITIZE "/fsanitize=address /Oy-")
else()
SET(COMPILE_FLAGS "-fno-rtti -Wno-invalid-offsetof")
# Same reasoning as the WIN32 branch's -DXP_WIN above: this build
# doesn't go through moz.build, which normally defines XP_UNIX on
# Linux/macOS -- without it, headers that branch on it (e.g.
# mfbt/UniquePtrExtensions.h's FileHandleType) hit their "Unsupported
# OS?" #error instead. Only surfaced now because CI's build-and-test
# job never got past an unrelated compiler-version failure before.
SET(COMPILE_FLAGS "-fno-rtti -Wno-invalid-offsetof -DXP_UNIX")

SET(OPTIMIZED "-Ofast -DNDEBUG")
SET(UNOPTIMIZED "-O0")
Expand Down
Loading
Loading