Skip to content

Set -Werror on generic_clang Bazel config. - #2389

Closed
ScottTodd wants to merge 1 commit into
iree-org:mainfrom
ScottTodd:werror
Closed

ScottTodd wants to merge 1 commit into
iree-org:mainfrom
ScottTodd:werror

Conversation

@ScottTodd

Copy link
Copy Markdown
Member

Otherwise -Wimplicit-fallthrough and -Wthread-safety-analysis warnings will go unnoticed.

Otherwise `-Wimplicit-fallthrough` and `-Wthread-safety-analysis` warnings will go unnoticed.
@ScottTodd

Copy link
Copy Markdown
Member Author
ERROR: /tmpfs/src/github/iree/iree/compiler/Dialect/HAL/Target/LLVM/internal/BUILD:20:1: Couldn't build file iree/compiler/Dialect/HAL/Target/LLVM/internal/_objs/LLVMAOTTargetLinker_internal/LLVMAOTTargetLinker.pic.o: C++ compilation of rule '//iree/compiler/Dialect/HAL/Target/LLVM/internal:LLVMAOTTargetLinker_internal' failed (Exit 1)
iree/compiler/Dialect/HAL/Target/LLVM/internal/LLVMAOTTargetLinker.cpp:30:3: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
  system(linkingCmd.c_str());
  ^~~~~~ ~~~~~~~~~~~~~~~~~~

fyi @asaadaldien

@GMNGeoffrey

Copy link
Copy Markdown
Member

Wooo I've been wanting to do this for a while. Thanks for doing it :-)

@GMNGeoffrey

Copy link
Copy Markdown
Member

We need to figure out how to exclude system libraries like zlib

@GMNGeoffrey

Copy link
Copy Markdown
Member

I believe I figured out how to do this in #2489

GMNGeoffrey added a commit that referenced this pull request Jul 12, 2020
We've been trying to figure out how to set this for a while and keep
running into warnings in third party code. I think this should take
care of it. We can add additional exclusions as necessary.

Closes #2389
@ScottTodd

Copy link
Copy Markdown
Member Author

I believe I figured out how to do this in #2489

Nice!

@ScottTodd
ScottTodd deleted the werror branch July 12, 2020 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants