Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow platform-specific startup options #22763

Open
peakschris opened this issue Jun 16, 2024 · 5 comments
Open

Allow platform-specific startup options #22763

peakschris opened this issue Jun 16, 2024 · 5 comments
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions type: feature request untriaged

Comments

@peakschris
Copy link

Description of the feature request:

Where a startup option is platform specific, currently there is no way to handle it in a single .bazelrc file that supports both platforms.

This would be desired:

startup:windows --host_jvm_args=-Djavax.net.ssl.trustStoreType=Windows-ROOT
startup:linux --host_jvm_args=-Djavax.net.ssl.trustStore=/etc/pki/java/cacerts

A similar syntax and set of built-in platforms to those supported by --enable_platform_specific_config would seem reasonable. I am not suggesting that we support the --config command line for startup.

Which category does this issue belong to?

Configurability

What underlying problem are you trying to solve with this feature?

A single .bazelrc file that can build multiple platforms without needing to 'configure' the file prior to first build.

Which operating system are you running Bazel on?

windows

What is the output of bazel info release?

7.2.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@aranguyen
Copy link
Contributor

@peakschris and would this be for host platforms? --enable_platform_specific_config makes the selection based on the host platform

@peakschris
Copy link
Author

Yes, host platform I believe makes sense.

jwcullen added a commit to AOMediaCodec/iamf-tools that referenced this issue Oct 23, 2024
… Clang versions.

  - Add approximate required versions of GCC/Clang.
    - Address #4, but leave issue open until we enforce this in the build.
  - Adds some documentation on how to build for native Windows, and we have existing GitHub CI building it. Close some issues:
    - Fix #5
    - Fix #6.
    - Due to bazelbuild/bazel#22763 it is difficult to configure custom "startup" options for windows. For now the instructions tell the user what configuration changes can be used to fix Windows "long path issues".
  - Drop "Linux" from build instructions header. All platform specific requirements are in the prerequisite sections. Build and test commands work on all supported platforms.

PiperOrigin-RevId: 688994914
@Spectre0911
Copy link

Spectre0911 commented Oct 30, 2024

@peakschris, currently attempting to do a very similar thing, did you manage to find a nice work-around to this?

@peakschris
Copy link
Author

peakschris commented Oct 30, 2024

Unfortunately not. We have a configure script for windows and linux that copies a platform-specific .bazelrc file into '%workspace%\.bazelrc.plat' and this is referenced by .bazelrc. I don't think there is any alternative at this time to avoid a configure script.

@Spectre0911
Copy link

@peakschris thanks for the response, hopefully this feature is worked on as it would certainly simplify things!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions type: feature request untriaged
Projects
None yet
Development

No branches or pull requests

6 participants