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

Configuration Tool Needed #152

Open
skaller opened this issue Mar 9, 2020 · 0 comments
Open

Configuration Tool Needed #152

skaller opened this issue Mar 9, 2020 · 0 comments

Comments

@skaller
Copy link
Member

skaller commented Mar 9, 2020

Felix needs a configuration tool. I keep trying to write one and fail.

The main purpose of the tool is to set up new target directories. This involves:

  1. Set up the target config directory. This depends on only three parameters:
  • the compiler
  • the machine word size 32/64
  • the OS
    and is a simple mechanical copy of *.fpc files from the tree structured src/config.
  1. set the standard felix macros flx.flxh to the right values for the OS

  2. Munge any C++ headers. There is only one now I think.

Build and install the target. This can be tricky. On Linux, we might be using a gcc cross compiler toolchain to build for Windows, or for Android. On MacOS we might be building for iPhone. On Windows there are a huge number of options, including building under Ubuntu for MSVC, cygwin64, using minGW, and others. The reality is in some cases Felix can run to generate C++ but it can't be compiled until shipped to another platform. In some cases a cross compiler is available but we can't link. In some cases we can link. In some cases we can even run the binary, eg iPhoneSimulator can run emulations of iPhone programs on MacOS. Cygwin, we can run. Etc. Controlling what stage is what and even running parts on one OS and parts on another are possible from a single tool. Some people even have a Mac with Parallels to run Windows.

In addition, one would like a file in .felix/config that says what targets to build. This raises another problem. At present, for host, the bootstrap sets up a configuration, and then clobbers it with overwrites from .felix/config. But this only works for host target. The whole cache is also for a single target, you cannot do concurrent builds for two targets. If you build for one target and switch to another, the cache is cleared and rebuilt from scratch each time.

In summary, Felix has much better facilities than any other system for handling multiple targets, but at present in-depth knowledge is required to configure them, and it has to be done by hand, the painful way. Even some tools to automate parts of this would be good.

I personally would like to build on MacOS for both clang and gcc to compare performance.

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

1 participant