Skip to content

Add missing linux flags and one missing for windows #3245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ build:windows --host_copt=-DNOGDI
build:windows --copt=/Zc:preprocessor
build:windows --host_copt=/Zc:preprocessor

# Misc build options we need for windows.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why they are not needed anymore? @rasapala why they were added earlier?

build:windows --linkopt=/DEBUG
build:windows --host_linkopt=/DEBUG
build:windows --linkopt=/OPT:REF
build:windows --host_linkopt=/OPT:REF
build:windows --linkopt=/OPT:ICF
Expand Down
14 changes: 14 additions & 0 deletions common_settings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,19 @@ LINUX_COMMON_STATIC_LIBS_COPTS = [
"-Werror",
# ov::Tensor::data method call results in deprecated warning and we use it in multiple places
"-Wno-deprecated-declarations",
"-Werror",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did we run some performance test to confirm no impact on benchmarks?

"-Wimplicit-fallthrough",
"-fcf-protection=full",
"-Wformat",
"-Wformat-security",
"-Werror=format-security",
"-Wl,-z,noexecstack",
"-fPIC",
"-D_GLIBCXX_ASSERTIONS",
"-Wl,-z,relro",
"-Wl,-z,relro,-z,now",
"-Wl,-z,nodlopen",
"-fstack-protector-strong",
]

WINDOWS_COMMON_STATIC_LIBS_COPTS = [
Expand All @@ -157,6 +170,7 @@ WINDOWS_COMMON_STATIC_LIBS_COPTS = [
"/wd4702",
"/wd4267",
"/wd4996",
"/guard:cf",
]

COMMON_STATIC_LIBS_COPTS = select({
Expand Down