Skip to content
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

CMake: break up glslang into smaller static libs #2301

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

ben-clayton
Copy link
Contributor

Add GenericCodeGen and MachineIndependent static library targets.
Privately import both of these into the glslang target.
Privately import MachineIndependent into the SPIRV target.

This is done to break the dependency of libglslang.so non-public APIs from libspirv.so,
which will become problematic once glslang hides its non-public symbols.

File Before After
libGenericCodeGen.a - 527716
libglslang.a 68175944 512938
libHLSL.a 1428 1428
libMachineIndependent.a - 67132202
libOGLCompiler.a 75908 75908
libOSDependent.a 23768 23768
libSPIRV.a 15710210 15710210
libSPVRemapper.a 3250894 3250894
File Before After
libglslang-default-resource-limits.so 117032 117032
libglslang.so 22380688 22368216
libHLSL.so 7520 7520
libOGLCompiler.a 75908 75908
libOSDependent.a 23768 23768
libSPIRV.so 7288336 28151016
libSPVRemapper.so 1940208 1940208

Issues: #2283, #1484

@ben-clayton
Copy link
Contributor Author

Shared library failures are expected - this PR requires #2297 to land first.

Will rebase this once landed.

Add `GenericCodeGen` and `MachineIndependent` static library targets.
Privately import both of these into the `glslang` target.
Privately import `MachineIndependent` into the  `SPIRV` target.

This is done to break the dependency of `libglslang.so` non-public APIs from `libspirv.so`,
which will become problematic once `glslang` hides its non-public symbols.

| File                      | Before     |     After  |
|---------------------------|-----------:|-----------:|
| `libGenericCodeGen.a`     |  -         |   `527716` |
| `libglslang.a`            | `68175944` |   `512938` |
| `libHLSL.a`               |     `1428` |     `1428` |
| `libMachineIndependent.a` |  -         | `67132202` |
| `libOGLCompiler.a`        |    `75908` |    `75908` |
| `libOSDependent.a`        |    `23768` |    `23768` |
| `libSPIRV.a`              | `15710210` | `15710210` |
| `libSPVRemapper.a`        |  `3250894` |  `3250894` |

| File                                    | Before     |     After  |
|-----------------------------------------|-----------:|-----------:|
| `libglslang-default-resource-limits.so` |   `117032` |   `117032` |
| `libglslang.so`                         | `22380688` | `22368216` |
| `libHLSL.so`                            |     `7520` |     `7520` |
| `libOGLCompiler.a`                      |    `75908` |    `75908` |
| `libOSDependent.a`                      |    `23768` |    `23768` |
| `libSPIRV.so`                           |  `7288336` | `28151016` |
| `libSPVRemapper.so`                     |  `1940208` |  `1940208` |

Issues: KhronosGroup#2283, KhronosGroup#1484
@ben-clayton
Copy link
Contributor Author

Rebased. *-shared presubmits now passing.

@johnkslang johnkslang merged commit c858d7b into KhronosGroup:master Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants