Import changes for goma server
- 359be3990e566f2e69c48bb60eb204e9928456e1 remoteexec: Support more flags for clang-cl relocatable c...
- b71ef8339d14b9b8c9f4e0deac2840450142494f Support -static-libgcc
- 145591b21f79ef856c4ce77a09274af6b46b2fef remoteexec: implement clangclRelocatableReq
- 6a04d35fa44717878506d89f0ec2ee5520829cb7 remoteexec: log user group of request
- b79757327b70ed13215f2d684b3ea3e94bb18e8f remoteexec: InputRootAbsolutePath support for Windows
- b44b229dc6d267eee2ea0463b81f830ad03cd53f roll google.golang.org/api v0.24.0 to v0.25.0
- 2cf5b6d60b7e780954ff18fd68f62a9fe7fd0d19 use go 1.14.3
- f792929863097064795fb12a41cfd5ebd58529a7 roll protoc to 3.12.0
- 6be6fc6f3d659aab7808316039ba6d745f77cfa1 roll github.com/golang/protobuf v1.4.1 to v1.4.2
- c0569523c6472d2aa5bc6dcb4c969a612a792c7c Remove reference to RBE documentation.
- 01a4d419a70f66388c2a7f7bfa8fd3b17289897b roll cloud.google.com/go/storage v1.7.0 to v1.8.0
- d1f2f0774a9e1fa871b28259b474df7418c3472b roll google.golang.org/api v0.23.0 to v0.24.0
- b23097692c90759587f572314c416a518a1b7084 roll cloud.google.com/go v0.56.0 to v0.57.0
- c77d37dcace158ce417e97c8ad0bd4e8da35664f roll cloud.google.com/go/storage v1.6.0 to v1.7.0
- 617403fdc0cbf8d9ba23ebd5109f323b82ebecbf roll github.com/golang/protobuf v1.4.0 to v1.4.1
- 58081c86461cddccbeafe34022711bac6089758b roll google.golang.org/protobuf v1.21.0 to v1.22.0
- 53c29dcc78dfafb39a288755df3e40c29275c563 roll google.golang.org/api v0.22.0 to v0.23.0
TBR=yyanagisawa@google.com, sque@google.com, yekuang@google.com
GitOrigin-RevId: 359be3990e566f2e69c48bb60eb204e9928456e1
Change-Id: Iecf17209d66bddd9fa47f28c52cf70c1e0a1d4f1
diff --git a/cipd_manifest.txt b/cipd_manifest.txt
index 80cb184..b16fe7a 100644
--- a/cipd_manifest.txt
+++ b/cipd_manifest.txt
@@ -13,9 +13,9 @@
# https://chrome-infra-packages.appspot.com/
# go
-infra/3pp/tools/go/${platform} version:1.14.2
+infra/3pp/tools/go/${platform} version:1.14.3
# protoc
# If the version you want is missing, please follow the instruction in:
# https://chromium.googlesource.com/infra/infra/+/refs/heads/master/bootstrap/cipd/doc/infra/tools/protoc/
-infra/tools/protoc/${platform} protobuf_version:v3.11.4
+infra/tools/protoc/${platform} protobuf_version:v3.12.0
diff --git a/cipd_manifest.versions b/cipd_manifest.versions
index 9f37e63..bc09a28 100644
--- a/cipd_manifest.versions
+++ b/cipd_manifest.versions
@@ -2,9 +2,9 @@
# Do not modify manually. All changes will be overwritten.
infra/3pp/tools/go/linux-amd64
- version:1.14.2
- 5X-axvSwNlp7JmgM6ca1mAeXKYVeQOgTkO4HyvchxxsC
+ version:1.14.3
+ H90a2JKY07JCBcm7-RfUzxvKXWyeY8THfo2aDOe_q5EC
infra/tools/protoc/linux-amd64
- protobuf_version:v3.11.4
- FcNzodTkFHz7Nrvv_hvhE32oOiZpJFCbCuyr4pWLetUC
+ protobuf_version:v3.12.0
+ R8on5znMbwEMRePJB1oLQw-xU1_sad_ET81UPr4v-XQC
diff --git a/go.mod b/go.mod
index c08e2c4..87e1f1f 100644
--- a/go.mod
+++ b/go.mod
@@ -3,15 +3,15 @@
go 1.12
require (
- cloud.google.com/go v0.56.0
+ cloud.google.com/go v0.57.0
cloud.google.com/go/pubsub v1.3.1
- cloud.google.com/go/storage v1.6.0
+ cloud.google.com/go/storage v1.8.0
contrib.go.opencensus.io/exporter/stackdriver v0.13.1
github.com/bazelbuild/remote-apis v0.0.0-20191104140458-e77c4eb2ca48
github.com/bazelbuild/remote-apis-sdks v0.0.0-20200117155253-d02017f96d3b
github.com/fsnotify/fsnotify v1.4.7
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
- github.com/golang/protobuf v1.4.0
+ github.com/golang/protobuf v1.4.2
github.com/gomodule/redigo v2.0.0+incompatible
github.com/google/go-cmp v0.4.0
github.com/google/uuid v1.1.1
@@ -21,11 +21,11 @@
go.opencensus.io v0.22.3
go.uber.org/zap v1.10.0
golang.org/x/build v0.0.0-20191031202223-0706ea4fce0c
- golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
+ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a
- google.golang.org/api v0.22.0
- google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940
+ google.golang.org/api v0.25.0
+ google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380
google.golang.org/grpc v1.29.1
- google.golang.org/protobuf v1.21.0
+ google.golang.org/protobuf v1.23.0
)
diff --git a/go.sum b/go.sum
index 1101ddd..c9ca6c8 100644
--- a/go.sum
+++ b/go.sum
@@ -20,6 +20,8 @@
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
cloud.google.com/go v0.56.0 h1:WRz29PgAsVEyPSDHyk+0fpEkwEFyfhHn+JbksT6gIL4=
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
+cloud.google.com/go v0.57.0 h1:EpMNVUorLiZIELdMZbCYX/ByTFCdoYopYAGxaGVz9ms=
+cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go/bigquery v1.0.1 h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0 h1:sAbMqjY1PEQKZBWfbu6Y6bsupJ9c4QdHnzg/VvYTLcE=
@@ -28,6 +30,8 @@
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0 h1:K2NyuHRuv15ku6eUpe0DQk5ZykPMnSOnvuVf6IHcjaE=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
+cloud.google.com/go/bigquery v1.7.0 h1:a/O/bK/vWrYGOTFtH8di4rBxMZnmkjy+Y5LxpDwo+dA=
+cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/datastore v1.0.0 h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ=
@@ -46,6 +50,8 @@
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0 h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
+cloud.google.com/go/storage v1.8.0 h1:86K1Gel7BQ9/WmNWn7dTKMvTLFzwtBe5FNqYbi9X35g=
+cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
contrib.go.opencensus.io/exporter/stackdriver v0.13.1 h1:RX9W6FelAqTVnBi/bRXJLXr9n18v4QkQwZYIdnNS51I=
contrib.go.opencensus.io/exporter/stackdriver v0.13.1/go.mod h1:z2tyTZtPmQ2HvWH4cOmVDgtY+1lomfKdbLnkJvZdc8c=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
@@ -147,6 +153,10 @@
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
+github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0=
+github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/gomodule/redigo v2.0.0+incompatible h1:K/R+8tc58AaqLkqG2Ol3Qk+DR/TlNuhuh457pBFPtt0=
github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
@@ -182,6 +192,8 @@
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3 h1:SRgJV+IoxM5MKyFdlSUeNy6/ycRUF2yBAKdAQswoHUk=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
+github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d h1:iaAPcMIY2f+gpk8tKf0BMW5sLrlhaASiYAnFmvVG5e0=
+github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
@@ -257,6 +269,7 @@
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4=
@@ -355,6 +368,10 @@
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5 h1:WQ8q63x+f/zpC8Ac1s9wLElVoHhm32p6tudrU72n1QA=
+golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/net v0.0.0-20200506145744-7e3656a0809f h1:QBjCr1Fz5kw158VqdE9JfI9cJnl/ymnJWAdMuinqL7Y=
+golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -409,6 +426,10 @@
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d h1:nc5K6ox/4lTFbMVSL9WRR81ixkcwXThoiF6yf+R9scA=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200501052902-10377860bb8e h1:hq86ru83GdWTlfQFZGO4nZJTU4Bs2wfHl8oFHRaXsfc=
+golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25 h1:OKbAoGs4fGM5cPLlVQLZGYkFC8OnOfgo6tt0Smf9XhM=
+golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
@@ -465,6 +486,10 @@
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4 h1:kDtqNkeBrZb8B+atrj50B5XLHpzXXqcCdZPP/ApQ5NY=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
+golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d h1:lzLdP95xJmMpwQ6LUHwrc5V7js93hTiY7gkznu0BgmY=
+golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88 h1:4j84u0sokprDu3IdSYHJMmou+YSLflMz8p7yAx/QI4g=
+golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
@@ -488,8 +513,11 @@
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40=
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.22.0 h1:J1Pl9P2lnmYFSJvgs70DKELqHNh8CNWXPbud4njEE2s=
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
+google.golang.org/api v0.24.0 h1:cG03eaksBzhfSIk7JRGctfp3lanklcOM/mTGvow7BbQ=
+google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
+google.golang.org/api v0.25.0 h1:LodzhlzZEUfhXzNUMIfVlf9Gr6Ua5MMtoFWh7+f47qA=
+google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -500,6 +528,8 @@
google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
+google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
+google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19 h1:Lj2SnHtxkRGJDqnGaSjo+CCdIieEnwVazbOXILwQemk=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
@@ -537,6 +567,10 @@
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 h1:pSLkPbrjnPyLDYUO2VM9mDLqo2V6CFBY84lFSZAfoi4=
+google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380 h1:xriR1EgvKfkKxIoU2uUvrMVl+H26359loFFUleSMXFo=
+google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU=
@@ -563,6 +597,10 @@
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
+google.golang.org/protobuf v1.22.0 h1:cJv5/xdbk1NnMPR1VP9+HU6gupuG9MLBoH1r6RHZ2MY=
+google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/proto/api/goma_data.pb.go b/proto/api/goma_data.pb.go
index 40d8037..00f1681 100644
--- a/proto/api/goma_data.pb.go
+++ b/proto/api/goma_data.pb.go
@@ -6,8 +6,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: api/goma_data.proto
package api
diff --git a/proto/api/goma_log.pb.go b/proto/api/goma_log.pb.go
index fefda94..5ff7946 100644
--- a/proto/api/goma_log.pb.go
+++ b/proto/api/goma_log.pb.go
@@ -7,8 +7,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: api/goma_log.proto
package api
diff --git a/proto/auth/acl.pb.go b/proto/auth/acl.pb.go
index 529e266..514674e 100644
--- a/proto/auth/acl.pb.go
+++ b/proto/auth/acl.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: auth/acl.proto
package auth
diff --git a/proto/auth/auth.pb.go b/proto/auth/auth.pb.go
index 3cb202d..697fca8 100644
--- a/proto/auth/auth.pb.go
+++ b/proto/auth/auth.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: auth/auth.proto
package auth
diff --git a/proto/auth/auth_service.pb.go b/proto/auth/auth_service.pb.go
index f739710..5adbec0 100644
--- a/proto/auth/auth_service.pb.go
+++ b/proto/auth/auth_service.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: auth/auth_service.proto
package auth
diff --git a/proto/auth/authdb.pb.go b/proto/auth/authdb.pb.go
index 2d4b49c..a944c26 100644
--- a/proto/auth/authdb.pb.go
+++ b/proto/auth/authdb.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: auth/authdb.proto
package auth
diff --git a/proto/auth/authdb_service.pb.go b/proto/auth/authdb_service.pb.go
index 55c571e..04aaa1d 100644
--- a/proto/auth/authdb_service.pb.go
+++ b/proto/auth/authdb_service.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: auth/authdb_service.proto
package auth
diff --git a/proto/backend/backend.pb.go b/proto/backend/backend.pb.go
index 534d98b..eaf47d4 100644
--- a/proto/backend/backend.pb.go
+++ b/proto/backend/backend.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: backend/backend.proto
package backend
diff --git a/proto/cache/cache.pb.go b/proto/cache/cache.pb.go
index c73c1eb..8dd8fc7 100644
--- a/proto/cache/cache.pb.go
+++ b/proto/cache/cache.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: cache/cache.proto
package cache
diff --git a/proto/cache/cache_service.pb.go b/proto/cache/cache_service.pb.go
index f5123eb..b0cfd50 100644
--- a/proto/cache/cache_service.pb.go
+++ b/proto/cache/cache_service.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: cache/cache_service.proto
package cache
diff --git a/proto/command/command.pb.go b/proto/command/command.pb.go
index 9d61bc7..65a6506 100644
--- a/proto/command/command.pb.go
+++ b/proto/command/command.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: command/command.proto
package command
diff --git a/proto/command/command_service.pb.go b/proto/command/command_service.pb.go
index 45a4d34..277cf52 100644
--- a/proto/command/command_service.pb.go
+++ b/proto/command/command_service.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: command/command_service.proto
package command
diff --git a/proto/command/package_opts.pb.go b/proto/command/package_opts.pb.go
index 2b814bf..855f42f 100644
--- a/proto/command/package_opts.pb.go
+++ b/proto/command/package_opts.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: command/package_opts.proto
package command
diff --git a/proto/command/setup.pb.go b/proto/command/setup.pb.go
index d173110..2f18ccf 100644
--- a/proto/command/setup.pb.go
+++ b/proto/command/setup.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: command/setup.proto
package command
diff --git a/proto/exec/exec_service.pb.go b/proto/exec/exec_service.pb.go
index 98c7b34..99fad3b 100644
--- a/proto/exec/exec_service.pb.go
+++ b/proto/exec/exec_service.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: exec/exec_service.proto
package exec
diff --git a/proto/execlog/log_service.pb.go b/proto/execlog/log_service.pb.go
index 598e864..e102f3e 100644
--- a/proto/execlog/log_service.pb.go
+++ b/proto/execlog/log_service.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: execlog/log_service.proto
package execlog
diff --git a/proto/file/file_service.pb.go b/proto/file/file_service.pb.go
index 793c603..eb0e05f 100644
--- a/proto/file/file_service.pb.go
+++ b/proto/file/file_service.pb.go
@@ -7,8 +7,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: file/file_service.proto
package file
diff --git a/proto/nsjail/config.pb.go b/proto/nsjail/config.pb.go
index 3eafd87..d75718f 100644
--- a/proto/nsjail/config.pb.go
+++ b/proto/nsjail/config.pb.go
@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: nsjail/config.proto
package nsjail
diff --git a/proto/settings/settings.pb.go b/proto/settings/settings.pb.go
index ef95a4d..6a37431 100644
--- a/proto/settings/settings.pb.go
+++ b/proto/settings/settings.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: settings/settings.proto
package settings
diff --git a/proto/settings/settings_service.pb.go b/proto/settings/settings_service.pb.go
index 6a3785f..7c1ee6e 100644
--- a/proto/settings/settings_service.pb.go
+++ b/proto/settings/settings_service.pb.go
@@ -4,8 +4,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.21.0
-// protoc v3.11.4
+// protoc-gen-go v1.23.0
+// protoc v3.12.1
// source: settings/settings_service.proto
package settings
diff --git a/remoteexec/adapter.go b/remoteexec/adapter.go
index 13280f9..27ce268 100644
--- a/remoteexec/adapter.go
+++ b/remoteexec/adapter.go
@@ -197,6 +197,11 @@
func (f *Adapter) newRequest(ctx context.Context, gomaReq *gomapb.ExecReq) *request {
logger := log.FromContext(ctx)
+ userGroup := "unknown-group"
+ endUser, ok := enduser.FromContext(ctx)
+ if ok {
+ userGroup = endUser.Group
+ }
gs := digest.NewStore()
timeout := f.ExecTimeout
if timeout == 0 {
@@ -204,8 +209,9 @@
}
client := f.client(ctx)
r := &request{
- f: f,
- client: client,
+ f: f,
+ userGroup: userGroup,
+ client: client,
cas: &cas.CAS{
Client: client,
Store: gs,
@@ -223,7 +229,7 @@
DoNotCache: doNotCache(gomaReq),
},
}
- logger.Infof("%s: new request", r.ID())
+ logger.Infof("%s: new request group:%q", r.ID(), userGroup)
return r
}
diff --git a/remoteexec/clang-cl.go b/remoteexec/clang-cl.go
index 5e4ac29..91ea5f0 100644
--- a/remoteexec/clang-cl.go
+++ b/remoteexec/clang-cl.go
@@ -5,19 +5,286 @@
package remoteexec
import (
- "errors"
+ "fmt"
+ "strconv"
+ "strings"
)
// TODO: share exec/clangcl.go ?
+var clangClPathFlags = []string{
+ "--sysroot=",
+ "-B",
+ "-I",
+ "-fcrash-diagnostics-dir=",
+ "-fprofile-instr-use=",
+ "-fprofile-sample-use=",
+ "-fsanitize-blacklist=",
+ "-include=",
+ "-isystem",
+ "-o",
+ "-resource-dir=",
+ "-imsvc",
+ "/FA",
+ "/Fa",
+ "/Fd",
+ "/Fe",
+ "/Fl",
+ "/Fm",
+ "/Fo",
+ "/Fp",
+ "/FR",
+ "/Fr",
+ "/FU",
+ "/Fx",
+}
+
+func isClangclWarningFlag(arg string) bool {
+ if len(arg) < 2 || (arg[:2] != "/W" && arg[0:2] != "/w") {
+ return false
+ }
+
+ basicFlags := []string{
+ "/w", // Suppress all warnings
+ "/W0", "/W1", "/W2", "/W3", "/W4", // Warning levels 0-4
+ "/Wall", // Display all warnings
+ "/WX", // Treats warnings as errors
+ "/Wv", // Display only warnings added in current compiler version
+ }
+ for _, flag := range basicFlags {
+ if arg == flag {
+ return true
+ }
+ }
+ // Display warnings added in given compiler version
+ if strings.HasPrefix(arg, "/Wv:") {
+ return true
+ }
+
+ // All remaining possible warnings have the format /wXnnnn
+ if len(arg) != 7 {
+ return false
+ }
+
+ switch arg[2:3] {
+ case "1", "2", "3", "4": // Set warning level for numbered warning
+ fallthrough
+ case "d": // Suppress numbered warning
+ fallthrough
+ case "e": // Treat numbered warning as error
+ fallthrough
+ case "o": // Report numbered warning only once
+ // Possible warning values: 4000-5999:
+ // https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/c-cpp-build-errors
+ warning, err := strconv.Atoi(arg[3:])
+ if err != nil {
+ return false
+ }
+ return warning >= 4000 && warning < 6000
+ }
+
+ return false
+}
+
+func isClangclOptimizationFlag(arg string) bool {
+ optFlags := []string{
+ "/O1", // Optimize for size
+ "/O2", // Optimize for speed
+ "/Ob0", "/Ob1", "/Ob2", "/Ob3", // Inline function expansino
+ "/Od", // Turn off optimization
+ "/Og", // Global optimization
+ "/Oi", "/Oi-", // Intrinsic functions
+ "/Os", "/Ot", // Favor small/fast code
+ "/Ox", // Enable most speed optimizations
+ "/Oy", "/Oy-", // Frame pointer omission
+ }
+ for _, flag := range optFlags {
+ if arg == flag {
+ return true
+ }
+ }
+ return false
+}
+
// clangclRelocatableReq checks if the request (args, envs) uses relative
// paths only and doesn't use flags that generates output including cwd,
// so will generate cwd-agnostic outputs
// (files/stdout/stderr will not include cwd dependent paths).
-//
-// TODO: implement it.
-func clangclRelocatableReq(args, envs []string) error {
- return errors.New("no relocatable check for clang-cl")
+// TODO: Combine some of this code with gccRelocatableReq.
+func clangclRelocatableReq(filepath clientFilePath, args, envs []string) error {
+ var debugFlags []string
+ subArgs := map[string][]string{}
+ var subCmd string
+ pathFlag := false
+Loop:
+ for _, arg := range args {
+ if pathFlag {
+ if filepath.IsAbs(arg) {
+ return fmt.Errorf("abs path: %s", arg)
+ }
+ pathFlag = false
+ continue
+ }
+ for _, fp := range clangClPathFlags {
+ if arg != fp && strings.HasPrefix(arg, fp) {
+ if filepath.IsAbs(arg[len(fp):]) {
+ return fmt.Errorf("abs path: %s", arg)
+ }
+ continue Loop
+ }
+ }
+ switch {
+ case subCmd != "":
+ subArgs[subCmd] = append(subArgs[subCmd], arg)
+ subCmd = ""
+
+ case strings.HasPrefix(arg, "-g"):
+ if arg == "-g0" {
+ debugFlags = nil
+ continue
+ }
+ debugFlags = append(debugFlags, arg)
+
+ case strings.HasPrefix(arg, "-Wa,"): // assembler arg
+ subArgs["as"] = append(subArgs["as"], strings.Split(arg[len("-Wa,"):], ",")...)
+ case strings.HasPrefix(arg, "-Wl,"): // linker arg
+ subArgs["ld"] = append(subArgs["ld"], strings.Split(arg[len("-Wl,"):], ",")...)
+ case strings.HasPrefix(arg, "-Wp,"): // preproc arg
+ subArgs["cpp"] = append(subArgs["cpp"], strings.Split(arg[len("-Wp,"):], ",")...)
+ case arg == "-Xclang":
+ subCmd = "clang"
+
+ case strings.HasPrefix(arg, "-w"): // inhibit all warnings
+ case strings.HasPrefix(arg, "-W"): // warning
+ case strings.HasPrefix(arg, "-D"): // define
+ case strings.HasPrefix(arg, "-U"): // undefine
+ case strings.HasPrefix(arg, "-O"): // optimize
+ case strings.HasPrefix(arg, "-f"): // feature
+ case strings.HasPrefix(arg, "-m"):
+ // -m64, -march=x86-64
+ case arg == "-arch":
+ case strings.HasPrefix(arg, "--target="):
+
+ case strings.HasPrefix(arg, "-no"):
+ // -no-canonical-prefixes, -nostdinc++
+ case arg == "-integrated-as":
+ case arg == "-pedantic":
+ case arg == "-pipe":
+ case arg == "-pthread":
+ case arg == "-c":
+ case strings.HasPrefix(arg, "-std"):
+ case strings.HasPrefix(arg, "--param="):
+ case arg == "-MMD" || arg == "-MD" || arg == "-M":
+ case arg == "-Qunused-arguments":
+ continue
+
+ case arg == "-o":
+ pathFlag = true
+ case arg == "-I" || arg == "-B" || arg == "-isystem" || arg == "-include":
+ pathFlag = true
+ case arg == "-MF":
+ pathFlag = true
+ case arg == "-isysroot":
+ pathFlag = true
+
+ // MSVC/clang-cl options are based on:
+ // https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-alphabetically?view=vs-2019
+ // https://clang.llvm.org/docs/UsersManual.html#id9
+ case arg == "/nologo":
+ case arg == "/Brepro", arg == "/Brepro-": // Emit an object file which can/cannot be reproduced over time
+ case arg == "/FS": // Forces serialization of all writes to the program database (PDB) file through MSPDBSRV.EXE
+ case arg == "/Gy", arg == "/Gy-": // Function-level linking
+ case arg == "/bigobj": // Support more sections in obj file
+ case arg == "/utf-8": // Set source and execution character set as UTF-8
+ case arg == "/X": // Ignore standard include paths
+ case arg == "/Z7", arg == "/Zi", arg == "/ZI": // Set debug format
+ case arg == "/MD", arg == "/MT", arg == "/LD": // Use normal runtime library
+ case arg == "/MDd", arg == "/MTd", arg == "/LDd": // Use debug runtime library
+ case arg == "/Tc", arg == "/Tp", arg == "/TC", arg == "/TP": // Source file type
+ case arg == "/Gd", arg == "/Gr", arg == "/Gv", arg == "/Gz": // Calling convention
+ case arg == "/GR", arg == "/GR-": // Specify RTTI
+ case arg == "/GS", arg == "/GS-": // Buffer security check
+ case arg == "/Gr", arg == "/Gr-": // Use __fastcall calling convention
+ case arg == "/Gw", arg == "/Gw-": // Optimize global data
+ case arg == "/GF": // Enables string pooling
+ case arg == "/c": // Compile without linking
+ case strings.HasPrefix(arg, "/D"): // Preprocessor
+ case strings.HasPrefix(arg, "/EH"): // Specify error handling
+ case strings.HasPrefix(arg, "/Zc:"): // Specify compiler behavior
+ case strings.HasPrefix(arg, "/arch:"): // Specify CPU architecture
+ case strings.HasPrefix(arg, "/clang:"): // Clang-specific option
+ case strings.HasPrefix(arg, "/guard:cf"): // Control flow guard security checks
+ case strings.HasPrefix(arg, "/showIncludes:"): // List include files
+ case strings.HasPrefix(arg, "/std:c++"): // Specify C++ standard
+ case isClangclWarningFlag(arg): // Flags to handle warnings
+ case isClangclOptimizationFlag(arg): // Flags to handle optimization
+ continue
+
+ case strings.HasPrefix(arg, "-"), strings.HasPrefix(arg, "/"): // unknown flag?
+ return fmt.Errorf("unknown flag: %s", arg)
+
+ default: // input file?
+ if filepath.IsAbs(arg) {
+ return fmt.Errorf("abs path: %s", arg)
+ }
+ }
+ }
+
+ if len(subArgs) > 0 {
+ for cmd, args := range subArgs {
+ switch cmd {
+ case "clang":
+ err := clangclArgRelocatable(filepath, args)
+ if err != nil {
+ return err
+ }
+ default:
+ return fmt.Errorf("unsupported subcommand args %s: %s", cmd, args)
+ }
+ }
+ }
+
+ for _, env := range envs {
+ e := strings.SplitN(env, "=", 2)
+ if len(e) != 2 {
+ return fmt.Errorf("bad environment variable: %s", env)
+ }
+ if e[0] == "PWD" {
+ continue
+ }
+ if filepath.IsAbs(e[1]) {
+ return fmt.Errorf("abs path in env %s=%s", e[0], e[1])
+ }
+ }
+ return nil
+}
+
+func clangclArgRelocatable(filepath clientFilePath, args []string) error {
+ pathFlag := false
+ skipFlag := false
+ for _, arg := range args {
+ switch {
+ case pathFlag:
+ if filepath.IsAbs(arg) {
+ return fmt.Errorf("clang-cl abs path: %s", arg)
+ }
+ pathFlag = false
+ case skipFlag:
+ skipFlag = false
+
+ case arg == "-fdebug-compilation-dir":
+ pathFlag = true
+ case strings.HasPrefix(arg, "-debug-info-kind"):
+ continue
+ case arg == "-add-plugin", arg == "-mllvm", arg == "-plugin-arg-blink-gc-plugin":
+ // TODO: pass llvmArgRelocatable for -mllvm?
+ skipFlag = true
+ continue
+ default:
+ return fmt.Errorf("clang-cl unknown arg: %s", arg)
+ }
+ }
+ return nil
}
// clangclOutputs returns output files from clang-cl command line.
diff --git a/remoteexec/clang-cl_test.go b/remoteexec/clang-cl_test.go
index 498f28f..f381ee7 100644
--- a/remoteexec/clang-cl_test.go
+++ b/remoteexec/clang-cl_test.go
@@ -6,9 +6,218 @@
import (
"reflect"
+ "strings"
"testing"
+
+ "go.chromium.org/goma/server/command/descriptor/winpath"
)
+func TestIsClangclWarningFlag(t *testing.T) {
+ for _, tc := range []struct {
+ desc string
+ flags []string
+ want bool
+ }{
+ {
+ desc: "basic",
+ flags: []string{
+ "/w", "/W0", "/W1", "/W2", "/W3", "/W4", "/Wall", "/WX", "/Wv",
+ },
+ want: true,
+ },
+ {
+ desc: "version",
+ flags: []string{
+ "/Wv:foo", "/Wv:bar",
+ },
+ want: true,
+ },
+ {
+ desc: "numbered warning level",
+ flags: []string{
+ "/w14000", "/w24001", "/wd4999", "/we5000", "/wo5001",
+ },
+ want: true,
+ },
+ {
+ desc: "not warning flag",
+ flags: []string{
+ "/foo", "/bar", "/", "",
+ },
+ want: false,
+ },
+ {
+ desc: "invalid numbered warning",
+ flags: []string{
+ "/wd300", "/we1000", "/wo6000", "/w1nnnn",
+ },
+ want: false,
+ },
+ } {
+ t.Run(tc.desc, func(t *testing.T) {
+ for _, flag := range tc.flags {
+ if got := isClangclWarningFlag(flag); got != tc.want {
+ t.Errorf("isClangclWarningFlag(%q)=%t; want %t", flag, got, tc.want)
+ }
+ }
+ })
+ }
+}
+
+func TestClangclRelocatableReq(t *testing.T) {
+
+ baseReleaseArgs := []string{
+ // Taken from actual Chromium Windows build args.
+ "..\\..\\third_party\\llvm-build\\Release+Asserts\\bin\\clang-cl.exe",
+ "/nologo",
+ "/showIncludes:user",
+ "-imsvc..\\..\\third_party\\depot_tools\\win_toolchain\\vs_files",
+ "-DUSE_AURA=1",
+ "-I../..",
+ "-fcolor-diagnostics",
+ "-fmerge-all-constants",
+ // POSIX-style paths are sometimes passed to clang-cl in Chromium, but they are relative paths.
+ "-fcrash-diagnostics-dir=../../tools/clang/crashreports",
+ "-Xclang",
+ "-fdebug-compilation-dir",
+ "-Xclang",
+ "./debug_compilation_dir",
+ "-no-canonical-prefixes",
+ "-I../../buildtools/third_party/libc++/trunk/include",
+ "/c",
+ "../../base/win/com_init_util.cc",
+ "/Foobj/base/base/com_init_util.obj",
+ "/Fdobj/base/base_cc.pdb",
+ }
+
+ modifyArgs := func(args []string, prefix, replace string) []string {
+ var ret []string
+ found := false
+ for _, arg := range args {
+ if strings.HasPrefix(arg, prefix) {
+ ret = append(ret, replace)
+ found = true
+ continue
+ }
+ ret = append(ret, arg)
+ }
+ if !found {
+ ret = append(ret, replace)
+ }
+ return ret
+ }
+
+ for _, tc := range []struct {
+ desc string
+ args []string
+ envs []string
+ relocatable bool
+ unknownFlag bool
+ }{
+ {
+ desc: "chromium base release",
+ args: baseReleaseArgs,
+ envs: []string{
+ "PWD=C:\\b\\c\\src\\out\\Release",
+ },
+ relocatable: true,
+ },
+ {
+ desc: "clang path absolute",
+ args: modifyArgs(baseReleaseArgs,
+ "..\\..\\third_party\\llvm-build\\Release+Asserts\\bin\\clang-cl.exe",
+ "C:\\chromium\\src\\third_party\\llvm-build\\Release+Asserts\\bin\\clang-cl.exe"),
+ relocatable: false,
+ },
+ {
+ desc: "msvc path absolute",
+ args: modifyArgs(baseReleaseArgs,
+ "-imsvc..\\..\\third_party\\depot_tools\\win_toolchain\\vs_files",
+ "-imsvcC:\\chromium\\src\\third_party\\depot_tools\\win_toolchain\\vs_files"),
+ relocatable: false,
+ },
+ {
+ desc: "include path absolute",
+ args: modifyArgs(baseReleaseArgs,
+ "-I../../buildtools/third_party/libc++/trunk/include",
+ "-IC:\\chromium\\src\\buildtools\\third_party\\libc++\\trunk\\include"),
+ relocatable: false,
+ },
+ {
+ desc: "-fcrash-diagnostics-dir path absolute",
+ args: modifyArgs(baseReleaseArgs,
+ "-fcrash-diagnostics-dir=../../tools/clang/crashreports",
+ "-fcrash-diagnostics-dir=C:\\chromium\\src\\tools\\clang\\crashreports"),
+ relocatable: false,
+ },
+ {
+ desc: "output path absolute",
+ args: modifyArgs(baseReleaseArgs,
+ "/Foobj/base/base/com_init_util.obj",
+ "/FoC:\\chromium\\src\\obj\\base\\base\\com_init_util.obj"),
+ relocatable: false,
+ },
+ {
+ desc: "debug output path absolute",
+ args: modifyArgs(baseReleaseArgs,
+ "/Fdobj/base/base_cc.pdb",
+ "/FdC:\\chromium\\src\\obj\\base\\base_cc.pdb"),
+ relocatable: false,
+ },
+ {
+ desc: "source path absolute",
+ args: modifyArgs(baseReleaseArgs,
+ "../../base/win/com_init_util.cc",
+ "C:\\chromium\\src\\base\\win\\com_init_util.cc"),
+ relocatable: false,
+ },
+ {
+ desc: "-fdebug-compilation-dir",
+ args: modifyArgs(baseReleaseArgs,
+ "./debug_compilation_dir",
+ "C:\\chromium\\src\\out\\Release\\debug_compilation_dir"),
+ relocatable: false,
+ },
+ {
+ desc: "invalid msvc flag",
+ args: modifyArgs(baseReleaseArgs, "", "/invalid"),
+ relocatable: false,
+ unknownFlag: true,
+ },
+ {
+ desc: "invalid dash flag",
+ args: modifyArgs(baseReleaseArgs, "", "-invalid"),
+ relocatable: false,
+ unknownFlag: true,
+ },
+ {
+ desc: "full chromium release build args",
+ args: fullChromiumReleaseBuildArgs,
+ relocatable: true,
+ },
+ {
+ desc: "full chromium debug build args",
+ args: fullChromiumDebugBuildArgs,
+ relocatable: true,
+ },
+ {
+ desc: "full llvm release build args",
+ args: fullLLVMReleaseBuildArgs,
+ relocatable: false,
+ },
+ } {
+ t.Run(tc.desc, func(t *testing.T) {
+ err := clangclRelocatableReq(winpath.FilePath{}, tc.args, tc.envs)
+ if (err == nil) != tc.relocatable {
+ t.Errorf("clangclRelocatableReq(winpath.FilePath, args, envs)=%v; relocatable=%t", err, tc.relocatable)
+ }
+ if err != nil && tc.unknownFlag != strings.Contains(err.Error(), "unknown flag") {
+ t.Errorf("clangclRelocatableReq(winpath.FilePath, args, envs)=%v; expected unknown flag", err)
+ }
+ })
+ }
+}
+
func TestClangclOutputs(t *testing.T) {
for _, tc := range []struct {
desc string
@@ -55,3 +264,363 @@
})
}
}
+
+var fullChromiumReleaseBuildArgs = []string{
+ "..\\..\\third_party\\llvm-build\\Release+Asserts\\bin\\clang-cl.exe",
+ "/nologo",
+ "/showIncludes:user",
+ "-imsvc..\\..\\third_party\\depot_tools\\win_toolchain\\vs_files\\9ff60e43ba91947baca460d0ca3b1b980c3a2c23\\win_sdk",
+ "-DUSE_AURA=1",
+ "-DCR_CLANG_REVISION=\"n353803-99ac9ce7-1\"",
+ "-D_HAS_NODISCARD",
+ "-D_LIBCPP_ABI_UNSTABLE",
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
+ "-D_LIBCPP_ENABLE_NODISCARD",
+ "-D_LIBCPP_NO_AUTO_LINK",
+ "-D__STD_C",
+ "-D_CRT_RAND_S",
+ "-D_CRT_SECURE_NO_DEPRECATE",
+ "-D_SCL_SECURE_NO_DEPRECATE",
+ "-D_ATL_NO_OPENGL",
+ "-D_WINDOWS",
+ "-DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
+ "-DPSAPI_VERSION=2",
+ "-DWIN32",
+ "-D_SECURE_ATL",
+ "-DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP",
+ "-DWIN32_LEAN_AND_MEAN",
+ "-DNOMINMAX",
+ "-D_UNICODE",
+ "-DUNICODE",
+ "-DNTDDI_VERSION=NTDDI_WIN10_RS2",
+ "-D_WIN32_WINNT=0x0A00",
+ "-DWINVER=0x0A00",
+ "-DNDEBUG",
+ "-DNVALGRIND",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
+ "-DBASE_IMPLEMENTATION",
+ "-I../..",
+ "-Igen",
+ "-I../../third_party/boringssl/src/include",
+ "-fcolor-diagnostics",
+ "-fmerge-all-constants",
+ "-fcrash-diagnostics-dir=../../tools/clang/crashreports",
+ "-Xclang",
+ "-mllvm",
+ "-Xclang",
+ "-instcombine-lower-dbg-declare=0",
+ "-fcomplete-member-pointers",
+ "/Gy",
+ "/FS",
+ "/bigobj",
+ "/utf-8",
+ "/Zc:twoPhase",
+ "/Zc:sizedDealloc-",
+ "/X",
+ "-fmsc-version=1916",
+ "/guard:cf,nochecks",
+ "-m64",
+ "/Brepro",
+ "-Wno-builtin-macro-redefined",
+ "-D__DATE__=",
+ "-D__TIME__=",
+ "-D__TIMESTAMP__=",
+ "-Xclang",
+ "-fdebug-compilation-dir",
+ "-Xclang",
+ ".",
+ "-no-canonical-prefixes",
+ "/W4",
+ "-Wimplicit-fallthrough",
+ "-Wunreachable-code",
+ "-Wthread-safety",
+ "-Wextra-semi",
+ "/WX",
+ "/wd4091",
+ "/wd4127",
+ "/wd4251",
+ "/wd4275",
+ "/wd4312",
+ "/wd4324",
+ "/wd4351",
+ "/wd4355",
+ "/wd4503",
+ "/wd4589",
+ "/wd4611",
+ "/wd4100",
+ "/wd4121",
+ "/wd4244",
+ "/wd4505",
+ "/wd4510",
+ "/wd4512",
+ "/wd4610",
+ "/wd4838",
+ "/wd4995",
+ "/wd4996",
+ "/wd4456",
+ "/wd4457",
+ "/wd4458",
+ "/wd4459",
+ "/wd4200",
+ "/wd4201",
+ "/wd4204",
+ "/wd4221",
+ "/wd4245",
+ "/wd4267",
+ "/wd4305",
+ "/wd4389",
+ "/wd4702",
+ "/wd4701",
+ "/wd4703",
+ "/wd4661",
+ "/wd4706",
+ "/wd4715",
+ "-Wno-missing-field-initializers",
+ "-Wno-unused-parameter",
+ "-Wno-c++11-narrowing",
+ "-Wno-unneeded-internal-declaration",
+ "-Wno-undefined-var-template",
+ "-Wno-nonportable-include-path",
+ "-Wno-ignored-pragma-optimize",
+ "-Wno-implicit-int-float-conversion",
+ "-Wno-final-dtor-non-final-class",
+ "-Wno-builtin-assume-aligned-alignment",
+ "-Wno-deprecated-copy",
+ "-Wno-non-c-typedef-for-linkage",
+ "-Wmax-tokens",
+ "/Z7",
+ "-gcodeview-ghash",
+ "-Xclang",
+ "-debug-info-kind=constructor",
+ "-ftrivial-auto-var-init=pattern",
+ "/MT",
+ "-Xclang",
+ "-add-plugin",
+ "-Xclang",
+ "find-bad-constructs",
+ "-Wheader-hygiene",
+ "-Wstring-conversion",
+ "-Wtautological-overlap-compare",
+ "-Wglobal-constructors",
+ "-Wexit-time-destructors",
+ "-Wshadow",
+ "-Wno-shorten-64-to-32",
+ "-Wexit-time-destructors",
+ "/O2",
+ "/Ob2",
+ "/Oy-",
+ "/Zc:inline",
+ "/Gw",
+ "/TP",
+ "/wd4577",
+ "/GR-",
+ "-I../../buildtools/third_party/libc++/trunk/include",
+ "/c",
+ "../../base/win/com_init_util.cc",
+ "/Foobj/base/base/com_init_util.obj",
+ "/Fdobj/base/base_cc.pdb",
+}
+
+var fullChromiumDebugBuildArgs = []string{
+ "..\\..\\third_party\\llvm-build\\Release+Asserts\\bin\\clang-cl.exe",
+ "/nologo",
+ "/showIncludes:user",
+ "-imsvc..\\..\\third_party\\depot_tools\\win_toolchain\\vs_files\\9ff60e43ba91947baca460d0ca3b1b980c3a2c23\\win_sdk",
+ "-DUSE_AURA=1",
+ "-DCR_CLANG_REVISION=\"n353803-99ac9ce7-1\"",
+ "-D_HAS_NODISCARD",
+ "-DCOMPONENT_BUILD",
+ "-D_LIBCPP_ABI_UNSTABLE",
+ "-D_LIBCPP_ENABLE_NODISCARD",
+ "-D_LIBCPP_NO_AUTO_LINK",
+ "-D__STD_C",
+ "-D_CRT_RAND_S",
+ "-D_CRT_SECURE_NO_DEPRECATE",
+ "-D_SCL_SECURE_NO_DEPRECATE",
+ "-D_ATL_NO_OPENGL",
+ "-D_WINDOWS",
+ "-DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
+ "-DPSAPI_VERSION=2",
+ "-DWIN32",
+ "-D_SECURE_ATL",
+ "-DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP",
+ "-DWIN32_LEAN_AND_MEAN",
+ "-DNOMINMAX",
+ "-D_UNICODE",
+ "-DUNICODE",
+ "-DNTDDI_VERSION=NTDDI_WIN10_RS2",
+ "-D_WIN32_WINNT=0x0A00",
+ "-DWINVER=0x0A00",
+ "-D_DEBUG",
+ "-DDYNAMIC_ANNOTATIONS_ENABLED=1",
+ "-I../..",
+ "-Igen",
+ "-fcolor-diagnostics",
+ "-fmerge-all-constants",
+ "-fcrash-diagnostics-dir=../../tools/clang/crashreports",
+ "-Xclang",
+ "-mllvm",
+ "-Xclang",
+ "-instcombine-lower-dbg-declare=0",
+ "-fcomplete-member-pointers",
+ "/Gy",
+ "/FS",
+ "/bigobj",
+ "/utf-8",
+ "/Zc:twoPhase",
+ "/Zc:sizedDealloc-",
+ "/X",
+ "-fmsc-version=1916",
+ "/guard:cf,nochecks",
+ "/Zc:dllexportInlines-",
+ "-m64",
+ "/Brepro",
+ "-Wno-builtin-macro-redefined",
+ "-D__DATE__=",
+ "-D__TIME__=",
+ "-D__TIMESTAMP__=",
+ "-Xclang",
+ "-fdebug-compilation-dir",
+ "-Xclang",
+ ".",
+ "-no-canonical-prefixes",
+ "/W4",
+ "-Wimplicit-fallthrough",
+ "-Wunreachable-code",
+ "-Wthread-safety",
+ "-Wextra-semi",
+ "/WX",
+ "/wd4091",
+ "/wd4127",
+ "/wd4251",
+ "/wd4275",
+ "/wd4312",
+ "/wd4324",
+ "/wd4351",
+ "/wd4355",
+ "/wd4503",
+ "/wd4589",
+ "/wd4611",
+ "/wd4100",
+ "/wd4121",
+ "/wd4244",
+ "/wd4505",
+ "/wd4510",
+ "/wd4512",
+ "/wd4610",
+ "/wd4838",
+ "/wd4995",
+ "/wd4996",
+ "/wd4456",
+ "/wd4457",
+ "/wd4458",
+ "/wd4459",
+ "/wd4200",
+ "/wd4201",
+ "/wd4204",
+ "/wd4221",
+ "/wd4245",
+ "/wd4267",
+ "/wd4305",
+ "/wd4389",
+ "/wd4702",
+ "/wd4701",
+ "/wd4703",
+ "/wd4661",
+ "/wd4706",
+ "/wd4715",
+ "-Wno-missing-field-initializers",
+ "-Wno-unused-parameter",
+ "-Wno-c++11-narrowing",
+ "-Wno-unneeded-internal-declaration",
+ "-Wno-undefined-var-template",
+ "-Wno-nonportable-include-path",
+ "-Wno-ignored-pragma-optimize",
+ "-Wno-implicit-int-float-conversion",
+ "-Wno-final-dtor-non-final-class",
+ "-Wno-builtin-assume-aligned-alignment",
+ "-Wno-deprecated-copy",
+ "-Wno-non-c-typedef-for-linkage",
+ "-Wmax-tokens",
+ "/Od",
+ "/Ob0",
+ "/GF",
+ "/Z7",
+ "-gcodeview-ghash",
+ "-Xclang",
+ "-debug-info-kind=constructor",
+ "-ftrivial-auto-var-init=pattern",
+ "/MDd",
+ "-Xclang",
+ "-add-plugin",
+ "-Xclang",
+ "find-bad-constructs",
+ "-Wheader-hygiene",
+ "-Wstring-conversion",
+ "-Wtautological-overlap-compare",
+ "-Wno-unused-const-variable",
+ "-Wno-unused-function",
+ "-Wno-undefined-bool-conversion",
+ "-Wno-tautological-undefined-compare",
+ "/TP",
+ "/wd4577",
+ "/GR-",
+ "-I../../buildtools/third_party/libc++/trunk/include",
+ "/c",
+ "../../base/third_party/double_conversion/double-conversion/fast-dtoa.cc",
+ "/Foobj/base/third_party/double_conversion/double_conversion/fast-dtoa.obj",
+ "/Fdobj/base/third_party/double_conversion/double_conversion_cc.pdb",
+}
+
+var fullLLVMReleaseBuildArgs = []string{
+ "C:\\b\\s\\w\\ir\\cache\\builder\\v8\\third_party\\llvm-build\\Release+Asserts\\bin\\clang-cl.exe",
+ "/nologo",
+ "-TP",
+ "-DGTEST_HAS_RTTI=0",
+ "-DUNICODE",
+ "-D_CRT_NONSTDC_NO_DEPRECATE",
+ "-D_CRT_NONSTDC_NO_WARNINGS",
+ "-D_CRT_SECURE_NO_DEPRECATE",
+ "-D_CRT_SECURE_NO_WARNINGS",
+ "-D_HAS_EXCEPTIONS=0",
+ "-D_SCL_SECURE_NO_DEPRECATE",
+ "-D_SCL_SECURE_NO_WARNINGS",
+ "-D_UNICODE",
+ "-D__STDC_CONSTANT_MACROS",
+ "-D__STDC_FORMAT_MACROS",
+ "-D__STDC_LIMIT_MACROS",
+ "-Itools\\opt",
+ "-IC:\\b\\s\\w\\ir\\cache\\builder\\emscripten-releases\\llvm-project\\llvm\\tools\\opt",
+ "-Iinclude",
+ "-IC:\\b\\s\\w\\ir\\cache\\builder\\emscripten-releases\\llvm-project\\llvm\\include",
+ "-Wno-nonportable-include-path",
+ "/Zc:inline",
+ "/Zc:strictStrings",
+ "/Oi",
+ "/Zc:rvalueCast",
+ "/Brepro",
+ "/W4",
+ "-Wextra",
+ "-Wno-unused-parameter",
+ "-Wwrite-strings",
+ "-Wcast-qual",
+ "-Wmissing-field-initializers",
+ "-Wimplicit-fallthrough",
+ "-Wcovered-switch-default",
+ "-Wno-noexcept-type",
+ "-Wdelete-non-virtual-dtor",
+ "-Wstring-conversion",
+ "/Gw",
+ "/MD",
+ "/O2",
+ "/Ob2",
+ "/EHs-c-",
+ "/GR-",
+ "-UNDEBUG",
+ "-std:c++14",
+ "/showIncludes",
+ "/Fotools\\opt\\CMakeFiles\\opt.dir\\PrintSCC.cpp.obj",
+ "/Fdtools\\opt\\CMakeFiles\\opt.dir\\",
+ "-c",
+ "C:\\b\\s\\w\\ir\\cache\\builder\\emscripten-releases\\llvm-project\\llvm\\tools\\opt\\PrintSCC.cpp",
+}
diff --git a/remoteexec/exec.go b/remoteexec/exec.go
index c1ad294..6424e48 100644
--- a/remoteexec/exec.go
+++ b/remoteexec/exec.go
@@ -39,9 +39,10 @@
)
type request struct {
- f *Adapter
- gomaReq *gomapb.ExecReq
- gomaResp *gomapb.ExecResp
+ f *Adapter
+ userGroup string
+ gomaReq *gomapb.ExecReq
+ gomaResp *gomapb.ExecResp
client Client
cas *cas.CAS
@@ -617,6 +618,7 @@
wrapperInputRootAbsolutePath
wrapperNsjailChroot
wrapperWin
+ wrapperWinInputRootAbsolutePath
)
func (w wrapperType) String() string {
@@ -629,6 +631,8 @@
return "wrapper-nsjail-chroot"
case wrapperWin:
return "wrapper-win"
+ case wrapperWinInputRootAbsolutePath:
+ return "wrapper-win-input-root-absolute-path"
default:
return fmt.Sprintf("wrapper-unknown-%d", int(w))
}
@@ -692,7 +696,13 @@
}
}
case cmdpb.CmdDescriptor_WINDOWS:
- wt = wrapperWin
+ err = relocatableReq(ctx, cmdConfig, r.filepath, r.gomaReq.Arg, r.gomaReq.Env)
+ if err != nil {
+ wt = wrapperWinInputRootAbsolutePath
+ logger.Infof("non relocatable: %v", err)
+ } else {
+ wt = wrapperWin
+ }
default:
return fmt.Errorf("bad path type: %v", pathType)
}
@@ -762,6 +772,21 @@
isExecutable: true,
},
}
+ case wrapperWinInputRootAbsolutePath:
+ logger.Infof("run on win with InputRootAbsolutePath")
+ // https://cloud.google.com/remote-build-execution/docs/remote-execution-properties#container_properties
+ r.addPlatformProperty(ctx, "InputRootAbsolutePath", r.tree.RootDir())
+ wn, data, err := wrapperForWindows(ctx)
+ if err != nil {
+ return err
+ }
+ files = []fileDesc{
+ {
+ name: wn,
+ data: data,
+ isExecutable: true,
+ },
+ }
default:
return fmt.Errorf("bad wrapper type: %v", wt)
}
@@ -835,7 +860,7 @@
case "gcc", "g++", "clang", "clang++":
return gccRelocatableReq(filepath, args, envs)
case "clang-cl":
- return clangclRelocatableReq(args, envs)
+ return clangclRelocatableReq(filepath, args, envs)
case "javac":
// Currently, javac in Chromium is fully relocatable. Simpler just to
// support only the relocatable case and let it fail if the client passed
diff --git a/remoteexec/gcc.go b/remoteexec/gcc.go
index 4903faf..6f3d519 100644
--- a/remoteexec/gcc.go
+++ b/remoteexec/gcc.go
@@ -163,6 +163,7 @@
case strings.HasPrefix(arg, "--param="):
case arg == "-MMD" || arg == "-MD" || arg == "-M":
case arg == "-Qunused-arguments":
+ case arg == "-static-libgcc":
continue
case arg == "-o":
diff --git a/remoteexec/gcc_test.go b/remoteexec/gcc_test.go
index 86e902d..4e6a3a0 100644
--- a/remoteexec/gcc_test.go
+++ b/remoteexec/gcc_test.go
@@ -275,6 +275,12 @@
"-fcrash-diagnostics-dir=/b/c/b/linux/src/tools/clang/crashreports"),
relocatable: false,
},
+ {
+ desc: "static-libgcc",
+ args: append(append([]string{}, baseReleaseArgs...),
+ "-static-libgcc"),
+ relocatable: true,
+ },
} {
t.Run(tc.desc, func(t *testing.T) {
err := gccRelocatableReq(posixpath.FilePath{}, tc.args, tc.envs)