Internal change
PiperOrigin-RevId: 539691184
Change-Id: Ic6853b7c09d9c04de1de5fd62f090163c5a156f7
diff --git a/.bazelrc b/.bazelrc
index 5b3d13f..a85e2a1 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1 +1 @@
-build --cxxopt=-std=c++17
+build --cxxopt=-std=c++17 --cxxopt=-fexceptions --cxxopt=-Wno-nonnull --cxxopt=-Wno-sign-compare --cxxopt=-Wno-parentheses --cxxopt=-Wno-deprecated-declarations
diff --git a/BUILD.bazel b/BUILD.bazel
index 2049b33..31c5a6e 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -5,6 +5,8 @@
"//visibility:public",
])
+ANTLR4_VERSION = "4.11.1"
+
genrule(
name = "fuzzyc_cc_module_sources",
srcs = [
@@ -24,10 +26,12 @@
"ModuleBaseListener.h",
],
cmd = " ".join([
- "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -o",
- "$(RULEDIR) -Dlanguage=Cpp -package fuzzyc_cc_module $(SRCS);",
- "find $(RULEDIR) \\( -name *.cpp -o -name *.h \\) -exec cp -n {} $(RULEDIR) \\;",
+ "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -v ",
+ ANTLR4_VERSION,
+ " -o $(RULEDIR) -Dlanguage=Cpp -package fuzzyc_cc_module $(SRCS);",
+ "find $(RULEDIR) \\( -name *.cpp -o -name *.h \\) -exec cp -n {} $(RULEDIR) \\;",
]),
+ local = True,
tools = [
requirement("antlr4-tools"),
"@fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4",
@@ -53,10 +57,12 @@
"FunctionBaseListener.h",
],
cmd = " ".join([
- "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -o",
- "$(RULEDIR) -Dlanguage=Cpp -package fuzzyc_cc_function $(SRCS);",
- "find $(RULEDIR) \\( -name *.cpp -o -name *.h \\) -exec cp -n {} $(RULEDIR) \\;",
+ "$(locations @fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4) -v ",
+ ANTLR4_VERSION,
+ " -o $(RULEDIR) -Dlanguage=Cpp -package fuzzyc_cc_function $(SRCS);",
+ "find $(RULEDIR) \\( -name *.cpp -o -name *.h \\) -exec cp -n {} $(RULEDIR) \\;",
]),
+ local = True,
tools = [
requirement("antlr4-tools"),
"@fuzzyc_deps_antlr4_tools//:rules_python_wheel_entry_point_antlr4",
@@ -77,11 +83,6 @@
"ModuleListener.h",
"ModuleParser.h",
],
- copts = [
- "-fexceptions",
- "-Wno-nonnull",
- "-std=c++17",
- ],
linkstatic = 1,
deps = [
":fuzzyc_cc_module_sources",
@@ -103,10 +104,6 @@
"FunctionListener.h",
"FunctionParser.h",
],
- copts = [
- "-fexceptions",
- "-Wno-nonnull",
- ],
linkstatic = 1,
deps = [
":fuzzyc_cc_function_sources",