@@ -501,6 +501,35 @@ package = {
501501 -- here each package carries its own compile flags, so it has to be
502502 -- stated. No extra import libs: -ladvapi32 arrives with abseil.
503503 cxxflags = { " -DNOMINMAX" , " -DWIN32_LEAN_AND_MEAN" , " -D_CRT_SECURE_NO_WARNINGS" },
504+
505+ -- NO `protoc` TARGET ON WINDOWS — a platform `targets` replaces the
506+ -- top-level one, so this drops the tool while keeping the library.
507+ --
508+ -- Not a protobuf problem and not a flags problem: the tool SUB-BUILD
509+ -- fails there. In the same CI run, tests/examples/protobuf,
510+ -- protobuf-upb and protobuf-gzip all pass on windows — the very same
511+ -- abseil + protobuf sources, built as an ordinary dependency. Only
512+ -- the sub-build dies, and only on three abseil TUs whose `.ddi` scan
513+ -- outputs never appear:
514+ --
515+ -- error: building host tool 'compat.protobuf:protoc' failed
516+ -- error: cannot read 'obj/compat_abseil/…/absl/time/internal/test_util.cc.ddi'
517+ -- …/cctz/src/time_zone_posix.cc.ddi, …/cctz/src/zone_info_source.cc.ddi
518+ --
519+ -- It is NOT path length (MAX_PATH was the obvious guess and it is
520+ -- wrong: those three relative paths are 31/46/47 chars, while
521+ -- absl/container/internal/hashtablez_sampler_force_weak_definition.cc
522+ -- at 67 compiles fine in the same sub-build). The sub-build's inner
523+ -- ninja output is summarized, so the underlying scan error is not in
524+ -- the log and the cause is UNKNOWN.
525+ --
526+ -- Declaring the target on a platform where it cannot be built would
527+ -- hand users a failure with no explanation. Left off until the
528+ -- sub-build issue is diagnosed on a windows host; nothing else about
529+ -- this descriptor is windows-gated.
530+ targets = {
531+ [" protobuf" ] = { kind = " lib" },
532+ },
504533 },
505534 },
506535}
0 commit comments