-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Implement Meson (take 2) #1836
base: dev
Are you sure you want to change the base?
Implement Meson (take 2) #1836
Conversation
Wrapper uses LLD for the linker as well. I think the wrapper doesn't need to be compiled if compiling without LLVM. However, the possibility to use the internal linker must then be turned off. |
I think LLVM optional was for people working on additional backends. Normally, LLVM should be required. |
Let me know what else I can help out with. |
Excellent, thank you. I can get that logic in re: LLVM. Re Lines 1 to 3 in 70da1f7
Should I fix the submodule or purge the |
You can drop .gitmodules completely. |
9e63e93
to
f0e6467
Compare
Added some CI that will let me get started on 'Windows' and 'MacOS'. Hopefully it's all straightforward! Rebased on current
Can you enlighten me as to the meaning of the $ ls test/test_suite/assignment/
alignment_index.c3t int_assign.c3t var_variable.c3 |
718df4c
to
a7f88e5
Compare
656443e
to
80c5d9f
Compare
I've squashed down the previous PR into a single commit, and my changes so far down as far as I can at this point. May need to script up something to generate the list of tests to be 100% sure I got 'em all but we're looking pretty good. If someone is able to unblock the CI workflow I'll see if I can get Windows and MacOS builds going - Pretty much all of the logic is ported and we're just on to working out what I broke in CI and any edge cases or things I overlooked :)
Do we need to add some preprocessor stuff for that (I don't see any existing toggles) or is the intent that users just don't set |
There are two sets of tests: one is the unit test variant, the other is what runs by way of a python script. The python script accepts two types of files (from the ancient times when the compiler was first written): The regular .c3 files which are just compiled normally, doing type checking, and the .c3t files which actually compile things and check the LLVM IR output. They have slightly different directives (in comments) available to them, and because originally things like |
* Fix missing newline and incorrect indentation for 'c3c project' help on fetch * Use a ternary trick :D --------- Co-authored-by: Christoffer Lerno <[email protected]>
…ools. Contracts @require/@Ensure are no longer treated as conditionals, but must be explicitly bool.
10a03a0
to
4d668a2
Compare
A translation of CMake to Meson Build, pending work required for compatibility check on other platforms like Windows and OSX. This is tested and confirmed to work on Arch Linux latest version. Features: - Option Checks for Hiding Warnings - Added check.py for checking the exit code of running a given unit test. Generated a huge 400+ unit test cases list for this build. Used to determine whether unit test pass or fail by providing exit code for meson test cases to use. This uses Regular Expressions for determining the number of passed tests out of total tests. - A simple utility for generate meson test cases
- handle additional search path required for gentoo (etc) - sort c3c_deps - Move tests to test/ Also programatically generate tests since each is effectively identical, this should be a lot easier to maintain (and a lot less for eyes to skim over) in future and saves on a _ton_ of boilerplate. It would be possible to 'subdir' each of the suites so that they're not all defined in one place (or closer to the actual tests!), but that's a matter of taste and workflow. - use `files` for sources `files` returns File objects which can be used as sources for build targets. File objects remember the subdirectory that they were defined in and can be used anywhere in the build, which should make it easier to refactor later if desired. - remove tilde-backend sources - no longer in tree - remove '`.gitmodules`, only contained tilde-backend - generate `git_hash.h` from `git_hash.h.in` using `git describe` and falling back to the version number set in Meson. - set default project arguments `c{,pp}_std` - add summary output - rtti detection (llvm-config && CMake) - make LLVM optional - MacOS and Windows support Signed-off-by: Matt Jolly <[email protected]>
90f4630
to
d958665
Compare
This PR picks up after #1097 (thanks @Opaatia) and rebases it on current HEAD.
I was asked to look into completing the port, so I'm not super familiar with c3c - apologies for any obvious oversights / questions!
While some existing CMake logic remains to be ported, there's an opportunity to potentially simplify it. Any guidance on the preferred approach (simplifying vs. following existing logic) would be greatly appreciated.
Progress and remaining tasks:
Done so far:
.gitmodules
git_hash.h
and conifguregit_hash.h.in
(new file)c{,pp}_std
,warning_level
buildtype
Not implemented:
Please let me know if there are any changes that I can make while I'm here.