Add common compilation flags to tests [BUILD-448]#25
Conversation
jungleraptor
left a comment
There was a problem hiding this comment.
On second thought lets go ahead and merge this.
But I think our goal once we get everything building with these compile flags should be to remove the bool flag.
| Args: | ||
| name: A unique name for this rule. | ||
| type: Specifies whether the test is a unit or integration test. | ||
| common_c_opts: Bool flag that indicates if common compilation flags will be added. Default False. |
There was a problem hiding this comment.
Were there things that failed to build unless this was an optional parameter?
Guessing in a lot of cases we need to remove certain flags via nocopts.
| kwargs["copts"] = copts + (kwargs["copts"] if "copts" in kwargs else []) | ||
| kwargs["name"] = name | ||
| kwargs["tags"] = (kwargs["tags"] if "tags" in kwargs else []) + [type] | ||
| kwargs["linkstatic"] = (kwargs["linkstatic"] if "linkstatic" in kwargs else True) |
There was a problem hiding this comment.
What's the reason for making this the default?
There was a problem hiding this comment.
I went back and forth but lets discuss a little more in our meeting tomorrow. Basically I don't want to have that bool flag become a permanent part of the API and am a little concerned that it might become difficult to remove it if we merge these changes as is.
This PR adds common compilation flags to
swift_cc_test_libraryand addscommon_c_optsflag toswift_cc_testwhich adds common compilation flags.This PR sets the
linkstaticflag toTrueinswift_cc_test.Tested here: