Created
October 9, 2019 15:01
-
-
Save jimevans/43c3228ec62b98e8da000fb494f2eade to your computer and use it in GitHub Desktop.
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
| def _library_impl(ctx): | |
| providers = {} | |
| stdrefs = [ctx.attr._stdrefs] if ctx.attr.include_stdrefs else [] | |
| for tfm in ctx.attr.target_frameworks: | |
| providers[tfm] = AssemblyAction( | |
| ctx.actions, | |
| name = ctx.attr.name, | |
| additionalfiles = ctx.files.additionalfiles, | |
| analyzers = ctx.attr.analyzers, | |
| debug = is_debug(ctx), | |
| defines = ctx.attr.defines, | |
| deps = ctx.attr.deps + stdrefs, | |
| keyfile = ctx.file.keyfile, | |
| langversion = ctx.attr.langversion, | |
| resources = ctx.files.resources, | |
| srcs = ctx.files.srcs, | |
| out = ctx.attr.out, | |
| target = "library", | |
| target_framework = tfm, | |
| toolchain = ctx.toolchains["@d2l_rules_csharp//csharp/private:toolchain_type"], | |
| ) | |
| fill_in_missing_frameworks(providers) | |
| result = providers.values() | |
| result.append(DefaultInfo( | |
| #files = depset([result[0].out, result[0].refout, result[0].pdb]), | |
| #Change from the immediately above to the below | |
| files = depset([result[0].out]), | |
| default_runfiles = ctx.runfiles(files = [result[0].refout, result[0].pdb]), | |
| )) | |
| return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment