Repository navigation
Conversation
Toolchains such as MacPorts R on macOS carry essential flags (-isysroot, -arch) in CXX17FLAGS, which never reached the libsass sub-make, failing the build with confusing libc++ header errors. Passing CXXFLAGS directly on the command line would override libsass's own ?=/+= appends (dropping -I include, -fPIC, -O2, -std=c++11), so forward via EXTRA_CXXFLAGS, which libsass's Makefile appends after its own flags.
The command-line CFLAGS had the same override problem fixed for C++ in the previous commit: it silently discarded libsass's own C flags (-Wall -O2 -fPIC). Harmless so far only because the lone C source (cencode.c) needs no include path and arm64 masks the missing -fPIC.
cpsievert
marked this pull request as draft
November 18, 2026 19:57
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Installing sass from source on macOS can fail when the R toolchain needs explicit SDK or architecture flags, or when GCC encounters a hard-coded
-stdlib=libc++flag.The bundled LibSass build now receives R’s active C++ flags on macOS and uses the standard library selected by that toolchain. This keeps the compiler settings for LibSass and the R package aligned.
Validation
Clean source installs on arm64 macOS passed with Apple Clang and Homebrew GCC 16. Each build linked the expected C++ runtime and passed 27 targeted checks. The reported MacPorts GCC 12 PowerPC setup remains unverified.
Closes #120.
Closes #144.