Skip to content

Commit 2f9f482

Browse files
committed
Workaround the -Werror,-Wmissing-braces errors in prism on system clang on macOS Mojave
1 parent 3e0c5dd commit 2f9f482

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mx.truffleruby/suite.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@
224224
"dir": "src/main/c/yarp",
225225
# "makeTarget": "all-no-debug", # Can use this to build without asserts
226226
"results": ["build/librubyparser.a"],
227+
"buildEnv": {
228+
# system clang on macOS Mojave warns+errors for `mystruct s = { 0 };` when there are struct fields.
229+
# newer compiler do not warn for this.
230+
"EXTRA_CFLAGS": "-Wno-missing-braces",
231+
},
227232
"description": "YARP used as a static library"
228233
},
229234

src/main/c/yarp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ FUZZ_OUTPUT_DIR = $(shell pwd)/fuzz/output
1111
SOEXT := $(shell ruby -e 'puts RbConfig::CONFIG["SOEXT"]')
1212

1313
CPPFLAGS := -Iinclude
14-
CFLAGS := -g -O2 -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wconversion -fPIC -fvisibility=hidden
14+
CFLAGS := -g -O2 -std=c99 -Wall -Werror -Wextra -Wpedantic -Wundef -Wconversion -fPIC -fvisibility=hidden $(EXTRA_CFLAGS)
1515
CC := cc
1616
WASI_SDK_PATH := /opt/wasi-sdk
1717

0 commit comments

Comments
 (0)