mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-11 22:30:53 +01:00
Only use -Wno-unused if we're actually using gcc
This is a bit difficult to detect, so for now we conservatively say that macOS always uses clang, and clang-based compilers always are called "clang".
This commit is contained in:
parent
aea1f6a718
commit
b286f6b5a3
1 changed files with 4 additions and 1 deletions
5
Makefile
5
Makefile
|
@ -49,7 +49,10 @@ OBJECTS=$(AST_OBJECTS) $(COMPILER_OBJECTS) $(ANALYSIS_OBJECTS) $(VM_OBJECTS) $(T
|
||||||
CXXFLAGS=-g -Wall -Werror
|
CXXFLAGS=-g -Wall -Werror
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|
||||||
CXXFLAGS+=-Wno-unused # temporary, for older gcc versions
|
# temporary, for older gcc versions as they treat var in `if (type var = val)` as unused
|
||||||
|
ifeq ($(findstring g++,$(shell $(CXX) --version)),g++)
|
||||||
|
CXXFLAGS+=-Wno-unused
|
||||||
|
endif
|
||||||
|
|
||||||
# configuration-specific flags
|
# configuration-specific flags
|
||||||
ifeq ($(config),release)
|
ifeq ($(config),release)
|
||||||
|
|
Loading…
Add table
Reference in a new issue