Skip to content

Commit ed97c5f

Browse files
Add missing linux flags and one missing for windows
1 parent 23405af commit ed97c5f

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.bazelrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,6 @@ build:windows --host_copt=-DNOGDI
215215
build:windows --copt=/Zc:preprocessor
216216
build:windows --host_copt=/Zc:preprocessor
217217

218-
# Misc build options we need for windows.
219-
build:windows --linkopt=/DEBUG
220-
build:windows --host_linkopt=/DEBUG
221218
build:windows --linkopt=/OPT:REF
222219
build:windows --host_linkopt=/OPT:REF
223220
build:windows --linkopt=/OPT:ICF

common_settings.bzl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,19 @@ LINUX_COMMON_STATIC_LIBS_COPTS = [
132132
"-Werror",
133133
# ov::Tensor::data method call results in deprecated warning and we use it in multiple places
134134
"-Wno-deprecated-declarations",
135+
"-Werror",
136+
"-Wimplicit-fallthrough",
137+
"-fcf-protection=full",
138+
"-Wformat",
139+
"-Wformat-security",
140+
"-Werror=format-security",
141+
"-Wl,-z,noexecstack",
142+
"-fPIC",
143+
"-D_GLIBCXX_ASSERTIONS",
144+
"-Wl,-z,relro",
145+
"-Wl,-z,relro,-z,now",
146+
"-Wl,-z,nodlopen",
147+
"-fstack-protector-strong",
135148
]
136149

137150
WINDOWS_COMMON_STATIC_LIBS_COPTS = [
@@ -157,6 +170,7 @@ WINDOWS_COMMON_STATIC_LIBS_COPTS = [
157170
"/wd4702",
158171
"/wd4267",
159172
"/wd4996",
173+
"/guard:cf",
160174
]
161175

162176
COMMON_STATIC_LIBS_COPTS = select({

0 commit comments

Comments
 (0)