Use -j parameter directly instead of GNUMAKEFLAGS#1491
Use -j parameter directly instead of GNUMAKEFLAGS#1491JSGette wants to merge 4 commits intobazel-contrib:mainfrom
Conversation
|
So, unfortunately, this approach doesn't work when make is invoked indirectly, something the env-variable-based version generally works around. This perhaps potentially speaks to the need to replace make with a wrapper (similar to ninja and meson), sigh. Maybe we need a more centralized approach to writing wrappers, since it seems like pretty much every tool needs one? More directly in your case, though, I'd probably recommend that you use the rfcc source-built make instead of the system make, since GNUMAKEFLAGS came with gmake 4.0 (released in 2013) and you're probably going to run into other bugs with such an old system make. You can do that by setting |
The funny thing is that I experienced a bug using source-build make but didn't have any issues with the one that is already on my system: The challenge in our case is that we support Windows, Linux and MacOS (both architectures) and it makes things a lot more complicated |
|
we use the source-built make on all three of those, too; what problem did you run into? |
|
pkgconfig fails to build on Windows. I ensured that both |
|
So, that didn't even get far enough to invoke make, so whatever's happening with system make vs source make is a side effect. Things to try:
|
|
@JSGette just realized: your log shows this: bash would interpret that as and that would explain why it can't find sed and friends. Not sure if this is an option for you, but in the strongest possible way I recommend using |
Depends on #48082. ### Motivation Moving the unreleased tip of main allows to address Bazel 9 related issues instead of patching locally: - bazel-contrib/rules_foreign_cc#1493 - bazel-contrib/rules_foreign_cc#1492 (`CcInfo` and other `Cc*` symbols) Other notable commits since: - bazel-contrib/rules_foreign_cc#1483 - bazel-contrib/rules_foreign_cc#1490 - bazel-contrib/rules_foreign_cc#1496 ### Additional Notes Patches 0002 (bazel-contrib/rules_foreign_cc#1452) and 0003 (bazel-contrib/rules_foreign_cc#1491) are still carried locally as neither has landed upstream yet (but we're working on it). Co-authored-by: regis.desgroppes <regis.desgroppes@datadoghq.com>
makethat is installed on macos Tahoe 26.2 is too old and doesn't supportGNUMAKEFLAGS. It makes usage of resource size formakeandconfigure makeunusable on macos (technically, you can use them but mac will just ignore -j parameter altogether and just build everything in a single thread). This PR addresses it by introducing a helper function that sets-jdirectly as an argument. Original intention of usingGNUMAKEFLAGSwas to not make nmake choke on unknown-jargument, the helper function has a check to ignore -j in case it's nmake and not GNU make.Currently installed version of make: