-
-
Notifications
You must be signed in to change notification settings - Fork 330
cxx20 module support for gcc #4248
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
Draft
loonycyborg
wants to merge
23
commits into
SCons:master
Choose a base branch
from
loonycyborg:cxx20-gcc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
813b108
Start implementing cxx20 module support for gcc
loonycyborg e9404aa
Declare CMI files as extra targets if module export statement is found
loonycyborg 3d9b9ef
Add module scanner that does simple regex and chain-calls classic sca…
loonycyborg 2990786
Changed mapper type used from file to unix domain socket
loonycyborg a89499d
Add support for header imports
loonycyborg bf5f82f
Add $root line to module.map
loonycyborg 4d53b8b
Make cxx module scanner recursive
loonycyborg 0c6a3b8
Fix cxx module scanner's include search path
loonycyborg 92263f5
Add unit test
loonycyborg 79d2861
Remove redundant semicolon
loonycyborg 78136f6
Moved test cxx module project into fixture
loonycyborg 577c5a5
Catch more specific exceptions
loonycyborg 577e354
Add dependency on module interface from module implementation unit
loonycyborg affe4e3
Add more faithful CODY protocol decode
loonycyborg 528b738
Add builder for c++ header units
loonycyborg 175ea07
Make only one header unit builder so as not to trip up unit test
loonycyborg cfe4ff7
Explicitly request gcc for the test
loonycyborg b5f8a00
Install gcc 12 in the github workflow for the test
loonycyborg be547d9
Added support for using tcp for module mapper on windows
loonycyborg a184ed5
Move module mapper code from gcc.py to gxx.py
loonycyborg fbcf7f2
Don't use default tools in module fixture
loonycyborg e6e825e
Skip gcc module test if g++ isn't found
loonycyborg dc1930a
Merge branch 'master' into cxx20-gcc
loonycyborg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
env = Environment(tools = ["link"]) | ||
try: | ||
env.Tool(ARGUMENTS["toolset"]) | ||
except KeyError: | ||
pass | ||
|
||
env.Append(CXXFLAGS = ["-std=c++20"]) | ||
env['CXXMODULEPATH'] = "cxx-scons-modules" | ||
env.Program("scons-module-test", ["itest.cpp", "test.cpp", "main.cpp"]) |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module test; | ||
|
||
int i = 42; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import test; | ||
|
||
import <iostream>; | ||
|
||
int main() | ||
{ | ||
std::cout << i << std::endl; | ||
test(); | ||
int i = fact<4>::value; | ||
std::cout << i << std::endl; | ||
return 0; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module; | ||
|
||
#include <iostream> | ||
#include "incl.h" | ||
|
||
export module test; | ||
export void test() | ||
{ | ||
std::cout << "hello, world\n"; | ||
} | ||
|
||
export template<unsigned int> struct fact; | ||
|
||
export extern int i; | ||
|
||
template<unsigned int n> | ||
struct fact { | ||
static constexpr unsigned int value = n * fact<n-1>::value; | ||
}; | ||
|
||
template<> | ||
struct fact<0> { | ||
static constexpr unsigned int value = 1; | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.