Skip to content

Commit 0b8e728

Browse files
committed
Add more documentation
1 parent 8986238 commit 0b8e728

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Sources/Build/Buildable.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ extension Module: Buildable {
3737
///FIXME: The user provided modulemap should be copied to build dir
3838
///but that requires copying the complete include dir because it'll
3939
///mostly likely contain relative paths.
40+
///FIXME: This is already computed when trying to generate modulemap
41+
///in ClangModule's `generateModuleMap(inDir wd: String)`
42+
///there shouldn't be need to redo this but is difficult in
43+
///current architecture
4044
if module.moduleMapPath.isFile {
4145
return ["-Xcc", "-fmodule-map-file=\(module.moduleMapPath)"]
4246
}

Sources/Build/misc.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ extension ClangModule {
4848
case UnsupportedIncludeLayoutForModule(String)
4949
}
5050

51+
///FIXME: we recompute the generated modulemap's path
52+
///when building swift modules in `XccFlags(prefix: String)`
53+
///there shouldn't be need to redo this there but is difficult
54+
///in current architecture
5155
public func generateModuleMap(inDir wd: String) throws {
5256

5357
///Return if module map is already present
@@ -88,9 +92,10 @@ extension ClangModule {
8892

8993
let umbrellaHeader = Path.join(moduleHeaderDir, "\(c99name).h")
9094

95+
///warn user if in case module name and c99name are different and there a `name.h` umbrella header
9196
let invalidUmbrellaHeader = Path.join(moduleHeaderDir, "\(name).h")
9297
if c99name != name && invalidUmbrellaHeader.isFile {
93-
print("warning: \(invalidUmbrellaHeader) should be renamed to \(umbrellaHeader) to be used as Umbrella header")
98+
print("warning: \(invalidUmbrellaHeader) should be renamed to \(umbrellaHeader) to be used as an umbrella header")
9499
}
95100

96101
if umbrellaHeader.isFile {

0 commit comments

Comments
 (0)