File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828name = " grpc-codegen-tests"
2929version = " 0.1.0"
3030
31- [target .'cfg(linux)' .dependencies .grpc ]
31+ # `cfg(unix)`, not one block per OS: the condition is "everywhere gRPC
32+ # resolves", and what excludes windows is compat.openssl having no xpm entry
33+ # there — a single fact, so a single predicate. mcpp evaluates `unix` as
34+ # family == "unix" (src/build/prepare.cppm, alongside any()/all()/not()).
35+ [target .'cfg(unix)' .dependencies .grpc ]
3236grpc = { version = " 1.83.0" , features = [" codegen" ] }
3337
34- [target .'cfg(linux)' .build ]
35- cxxflags = [" -DHAVE_GRPC=1" ]
36-
37- [target .'cfg(macos)' .dependencies .grpc ]
38- grpc = { version = " 1.83.0" , features = [" codegen" ] }
39-
40- [target .'cfg(macos)' .build ]
38+ [target .'cfg(unix)' .build ]
4139cxxflags = [" -DHAVE_GRPC=1" ]
4240
4341# windows carries the RULE but not gRPC itself, so build.mcpp compiles (its
Original file line number Diff line number Diff line change 1818name = " grpc-module-tests"
1919version = " 0.1.0"
2020
21- # linux + macOS only: the package has no windows xpm entry (its compat.openssl
21+ # unix only: the package has no windows xpm entry (its compat.openssl
2222# dependency has none yet), so on windows this member carries no dependency at
2323# all and the test compiles to a no-op main() — the same shape
2424# tests/examples/openssl uses for the same underlying reason.
25- [target .'cfg(linux)' .dependencies .grpc ]
26- grpc = " 1.83.0"
27-
28- [target .'cfg(linux)' .build ]
29- cxxflags = [" -DHAVE_GRPC=1" ]
30-
31- [target .'cfg(macos)' .dependencies .grpc ]
25+ #
26+ # One `cfg(unix)` rather than a linux block and an identical macos block: the
27+ # condition is a single fact ("gRPC resolves everywhere except windows"), so it
28+ # should be written once. mcpp evaluates `unix` as family == "unix"
29+ # (src/build/prepare.cppm, alongside any()/all()/not()).
30+ [target .'cfg(unix)' .dependencies .grpc ]
3231grpc = " 1.83.0"
3332
34- [target .'cfg(macos )' .build ]
33+ [target .'cfg(unix )' .build ]
3534cxxflags = [" -DHAVE_GRPC=1" ]
3635
3736[indices ]
You can’t perform that action at this time.
0 commit comments