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

What is the connection between BuildSystems and Backends #22

Open
erlingrj opened this issue Jun 30, 2023 · 4 comments
Open

What is the connection between BuildSystems and Backends #22

erlingrj opened this issue Jun 30, 2023 · 4 comments
Labels
question Further information is requested

Comments

@erlingrj
Copy link
Collaborator

I am struggling a bit with the organization. Currently LFC appears as both code-generator and backend and build system. The distinction between the two latter is also not clear. What is really the meaning of backend and build-system in the context of lingo?

@tanneberger
Copy link
Member

tanneberger commented Jul 1, 2023

The notion in my head is that the combination of target language and specified build system tells lingo which build backend to use.

   (C, Zephyre) -> Zephyr
   (Python, Zephyre) -> Invalid
   (Cpp, Cmake) -> CppCmake

@tanneberger tanneberger added the question Further information is requested label Jul 2, 2023
@erlingrj
Copy link
Collaborator Author

erlingrj commented Jul 3, 2023

Hm, as far as I understand it, we have three different categories:

  1. Target Language (C, Cpp, Python)
  2. Target platform (macOS, Linux, Windows, Zephyr, FreeRTOS, Arduino, nrf52)
  3. Build tool (CMake, GNU Make, arduino-cli, west)

And a backend covers a certain combinations of Languages, Platforms and a single build tool:

E.g.
CCMake covers: Language(C) and Platform(macOS, Windows, Linux, Zephyr, FreeRTOS)
CWest covers: Language(C) and Platform(Zephyr)

I still feel there is some other, more obvious way of structuring it. Another important distinction is between native compilation and cross compilation

@lhstrh
Copy link
Member

lhstrh commented Jul 3, 2023

So, to make the list complete, we have:

  1. Target Language (C, Cpp, Python)
  2. Target platform (macOS, Linux, Windows, Zephyr, FreeRTOS, Arduino, nrf52)
  3. Build tool (CMake, GNU Make, arduino-cli, west)
  4. Build platform (macOS, Linux, Windows)

Yet, we don't specify the build platform, it is implied. So I'm not sure that we need to treat cross compilation specially. Whether the compiled code runs on the platform that it was compiled on doesn't really matter from a tooling perspective...does it?

@tanneberger
Copy link
Member

tanneberger commented Jul 4, 2023

@lhstrh The only problem with your summary is that 2.) and 4.) are overlapping. Or do I miss something ?

We have a platform we compile for and currently (MacOS, Linux and Windows) are currently summarized in the enum value Native. And Platforms like nrf52 are treated separately and directly depend on some build tools (west).

We have a lot of dependencies between our "build-layers"

(Languae, Target) -> Build Tool

  (Phyton, *) -> (Pip, Phython)
  (Cpp, Native) -> CMake
  (C, Native) -> CMake
  (C, Some Board) -> Arduino or West
  (Typescript, *) -> npm

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

No branches or pull requests

3 participants