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

the host config can *only* be set as global config #81

Open
sbarthelemy opened this issue Apr 21, 2016 · 2 comments
Open

the host config can *only* be set as global config #81

sbarthelemy opened this issue Apr 21, 2016 · 2 comments

Comments

@sbarthelemy
Copy link

The only way to set the host config is by marking a single config as host="true" in ~/.qi/qibuild.xml.

This makes the option a global.

Imagine you want to cross-compile two branches (say master and release-2.0) each branch using its own version of the desktop and robot toolchain. You end up with 4 configs:

linux64-master
linux64-release2.6
atom-master
atom-release2.6

but you cannot build for atom-release2.6 and atom-master in parallel since they both require a different host config. (actually you cannot build for linux64-master and linux64-release2.6 in parallel either for the same reason).

having a global "default host config" is not bad per se, but there should be other ways to change that at a narrower scope. For instance

  • get the info from command-line option
  • get the info from an environment variable
  • let each config in ~/.qi/qibuild.xml set its own host config.
@dmerejkowsky
Copy link
Contributor

let each config in ~/.qi/qibuild.xml set its own host config.

Not sure whay you mean by that. Care to elaborate ?

@sbarthelemy
Copy link
Author

sbarthelemy commented Nov 18, 2016

currently we have a list of configs an one of them is tagged as the host config.

For instance here is the set of configs I use:

<config host="true" name="master-linux64">
  <toolchain>master-linux64</toolchain>
</config>
<config name="master-nao">
  <toolchain>master-atom</toolchain>
  <profiles>
    <profile>nao</profile>
  </profiles>
</config>
<config name="release-2.6-linux64">
  <toolchain>release-2.6-linux64</toolchain>
</config>
<config name="release-2.6-nao">
  <toolchain>release-2.6-atom</toolchain>
  <profiles>
    <profile>nao</profile>
  </profiles>
</config>

master-linux64 is the host config. It is rightfully used when cross-compiling for master-nao.
But when cross-compiling for release-2.6-nao, I should use release-2.6-linux64 as the host config.

As a consequence, I need to change the host config each time I switch between release-2.6 and master.

Since the config is global, that also means I cannot concurrently cross-compile for both master-nao and release-2.6-nao (even in two distinct worktrees).

An alternative implementation would be something like

<config name="master-linux64">
  <toolchain>master-linux64</toolchain>
</config>
<config name="master-nao" host_config="master-linux64">
  <toolchain>master-atom</toolchain>
  <profiles>
    <profile>nao</profile>
  </profiles>
</config>
<config name="release-2.6-linux64">
  <toolchain>release-2.6-linux64</toolchain>
</config>
<config name="release-2.6-nao" host_config="release-2.6-linux64">
  <toolchain>release-2.6-atom</toolchain>
  <profiles>
    <profile>nao</profile>
  </profiles>
</config>

Another solution would be to let the user pass the host config name as a command line argument

qibuild make-host-tools --host-config=release-2.6-linux64
qibuild configure --host-config=release-2.6-linux64 -c release-2.6-nao
qibuild make -c release-2.6-nao

Or to provide a way to use different config file (one per worktree) or passed from command-line argument.

Another "solution" would be to drop the host config feature and require host tools to be in the toolchain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants