Skip to content

Rename CLR_CMAKE_HOST_ARCH CLR_CMAKE_PLATFORM_ARCH - #1887

Closed
sdmaclea wants to merge 1 commit into
dotnet:masterfrom
sdmaclea:HostPlatform
Closed

Rename CLR_CMAKE_HOST_ARCH CLR_CMAKE_PLATFORM_ARCH#1887
sdmaclea wants to merge 1 commit into
dotnet:masterfrom
sdmaclea:HostPlatform

Conversation

@sdmaclea

Copy link
Copy Markdown
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

@hoyosjs hoyosjs left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

hoyosjs commented Jan 17, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
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

jkotas commented Jan 18, 2020

Copy link
Copy Markdown
Member

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

jkotas commented Jan 18, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

I’m good with matching clang and GCC.

@sdmaclea

Copy link
Copy Markdown
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