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

Rename CLR_CMAKE_HOST_ARCH CLR_CMAKE_PLATFORM_ARCH #1887

Closed
wants to merge 1 commit into from

Conversation

sdmaclea
Copy link
Contributor

We were currently using both the term "Platform" and "Host" to refer to the architecture of the executing code. They both are distiguished from the "Target" which is the architecture of the debug target, or JIT target.

The term "Platform" is dominant in the code. This changes the HOST usages to PLATFORM before adding more complexity for cross OS compilation.

@sdmaclea sdmaclea requested a review from hoyosjs January 17, 2020 22:47
@sdmaclea sdmaclea self-assigned this Jan 17, 2020
Copy link
Member

@hoyosjs hoyosjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the term host for being more explicit. However, I am not married to this. @jkoritzinsky and @janvorli would have more context between the terms

@jkoritzinsky
Copy link
Member

I think platform works better than host if we ever were to cross-build something that works with another arch (for example, a Linux x86 crossgen that outputs Linux ARM32 native code built on a Linux x64 machine). In this scenario, these would be the definitions of the terms:

  • Host: The os/build arch of the machine that is building the code
  • Platform: The os/build arch that the built code runs on
  • Target: the os/build arch the built product targets for jitting or debugging.

In most if not all of our cases today, Host == Platform.

@hoyosjs
Copy link
Member

hoyosjs commented Jan 17, 2020

I think platform works better than host if we ever were to cross-build something that works with another arch

Good point. Fair then.

In most if not all of our cases today, Host == Platform.

I guess only ARM/ARM64 cross compiles?

@janvorli
Copy link
Member

I guess only ARM/ARM64 cross compiles?

x86 (once / if we start to build it) would cross-compile too. We have support for it in our rootfs building scripts and our customers are using it.

@jkotas
Copy link
Member

jkotas commented Jan 18, 2020

definitions of the terms:
Host: The os/build arch of the machine that is building the code
Platform: The os/build arch that the built code runs on
Target: the os/build arch the built product targets for jitting or debugging.

We should stick to the definitions of terms that everybody else is using, so that people do not have to have a special decoder ring for our system:

https://clang.llvm.org/docs/CrossCompilation.html
https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html

Host: The os/build arch that the built code runs on
Build: The os/build arch of the machine that is building the code
Target: The os/build arch the built product targets for jitting or debugging.

@jkotas
Copy link
Member

jkotas commented Jan 18, 2020

Notice that nobody uses "platform" to name any of these 3. If "platform" is used, it is always with combination with other qualifier, e.g. "host platform" or "target platform".

@jkoritzinsky
Copy link
Member

I’m good with matching clang and GCC.

@sdmaclea
Copy link
Contributor Author

I'll close this and write the opposite patch... It'll be bigger...

@sdmaclea sdmaclea closed this Jan 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants