mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
26ce8ff768
...and keep binary size down using `--gc-sections` (supported by all major linkers). Stripped size after this PR is `85.3 Mb` down from `121 Mb` on `main`. This compliments Auke's recent work (though there is some overlap). See: https://github.com/hasura/graphql-engine-mono/pull/7033#issuecomment-1326673632 Old experiments, for reference: https://github.com/hasura/graphql-engine-mono/pull/6605 https://github.com/hasura/graphql-engine-mono/pull/6606 https://github.com/hasura/graphql-engine-mono/pull/6589 PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7079 GitOrigin-RevId: 0b0d86730fb959d6249bd17a87e39af12ef71261
46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
-- The project configuration used when building in CI.
|
|
|
|
reject-unconstrained-dependencies: all
|
|
|
|
package *
|
|
ghc-options:
|
|
-- We compile with package-level parallelism, so just use a small amount
|
|
-- of module-level parallelism for dependencies:
|
|
-- TODO: tune me
|
|
-j2
|
|
-- For performance, with `-j`:
|
|
+RTS -A64m -n2m -RTS
|
|
-- -----------------------------------------------------------
|
|
-- Allow for dead-code elimination at link-time, to reduce binary size
|
|
-- TODO WHEN WE NEXT UPGRADE GHC: move this into cabal.project
|
|
ghc-options: -split-sections
|
|
ld-options: -Wl,--gc-sections
|
|
-- -----------------------------------------------------------
|
|
|
|
-- Enable optimizations in all local (hasura) packages:
|
|
flags: +optimize-hasura
|
|
|
|
package graphql-engine
|
|
ghc-options:
|
|
-- At this point though we definitely want full module-level parallelism:
|
|
-j
|
|
-Werror
|
|
tests: true
|
|
benchmarks: true
|
|
|
|
-- %%%-BEGIN-PRO-ONLY-CONTENT-%%%
|
|
|
|
-- NOTE:
|
|
-- The label directly above this note marks the beginning of the pro-only
|
|
-- section of this file that should be removed by `Copybara` when migrating
|
|
-- this file to the public `graphql-engine` repository. We use a simple
|
|
-- regular expression to identify these segments (see the "transformations" in
|
|
-- `copy.bara.sky`), so please take care when manipulating this label!
|
|
|
|
package graphql-engine-pro
|
|
ghc-options:
|
|
-- At this point though we definitely want full module-level parallelism:
|
|
-j
|
|
-Werror
|
|
tests: true
|