-
Notifications
You must be signed in to change notification settings - Fork 710
Implement {cmm.asm}-{options,sources} for real #6033
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,7 +216,13 @@ buildComponent verbosity numJobs pkg_descr lbi suffixes | |
setupMessage' verbosity "Building" (packageId pkg_descr) | ||
(componentLocalName clbi) (maybeComponentInstantiatedWith clbi) | ||
let libbi = libBuildInfo lib | ||
lib' = lib { libBuildInfo = addExtraCxxSources (addExtraCSources libbi extras) extras } | ||
lib' = lib { libBuildInfo = flip addExtraAsmSources extras | ||
$ flip addExtraCmmSources extras | ||
$ flip addExtraCxxSources extras | ||
$ flip addExtraCSources extras | ||
$ libbi | ||
} | ||
|
||
buildLib verbosity numJobs pkg_descr lbi lib' clbi | ||
|
||
let oneComponentRequested (OneComponentRequestedSpec _) = True | ||
|
@@ -356,6 +362,24 @@ addExtraCxxSources bi extras = bi { cxxSources = new } | |
exs = Set.fromList extras | ||
|
||
|
||
-- | Add extra C-- sources generated by preprocessing to build | ||
-- information. | ||
addExtraCmmSources :: BuildInfo -> [FilePath] -> BuildInfo | ||
addExtraCmmSources bi extras = bi { cmmSources = new } | ||
where new = Set.toList $ old `Set.union` exs | ||
old = Set.fromList $ cmmSources bi | ||
exs = Set.fromList extras | ||
|
||
|
||
-- | Add extra ASM sources generated by preprocessing to build | ||
-- information. | ||
addExtraAsmSources :: BuildInfo -> [FilePath] -> BuildInfo | ||
addExtraAsmSources bi extras = bi { asmSources = new } | ||
where new = Set.toList $ old `Set.union` exs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I have both preprocessor-generated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, this probably will break if I have any preprocessor-generated C files at all. |
||
old = Set.fromList $ asmSources bi | ||
exs = Set.fromList extras | ||
|
||
|
||
replComponent :: [String] | ||
-> Verbosity | ||
-> PackageDescription | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@23Skidoo based on your observation, wasn't this line already broken? i.e. the same FilePaths (i.e.
extras
) being added to cxx and c sources?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, looks like it.