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

Compile with optimizations on Windows #2571

Merged
merged 1 commit into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Compile with optimizations on Windows
  • Loading branch information
cocreature committed Aug 16, 2019
commit a374aeb59f6206545b766bfb085fff1ddd51af51
12 changes: 8 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ exports_files(glob(["lib/**/*"]))
repositories = dev_env_nix_repos,
) if not is_windows else None

common_ghc_flags = [
"-O1",
"-hide-package=ghc-boot-th",
"-hide-package=ghc-boot",
]

# Used by Darwin and Linux
haskell_register_ghc_nixpkgs(
attribute_path = "ghcStaticDwarf" if enable_ghc_dwarf else "ghcStatic",
Expand All @@ -265,11 +271,8 @@ haskell_register_ghc_nixpkgs(
# we get a similar behavior on Darwin by default.
# However, we had to disable split-sections for now as it seems to interact very badly
# with the GHCi linker to the point where :main takes several minutes rather than several seconds.
compiler_flags = [
"-O1",
compiler_flags = common_ghc_flags + [
"-fexternal-dynamic-refs",
"-hide-package=ghc-boot-th",
"-hide-package=ghc-boot",
] + (["-g3"] if enable_ghc_dwarf else []),
compiler_flags_select = {
"@com_github_digital_asset_daml//:profiling_build": ["-fprof-auto"],
Expand All @@ -290,6 +293,7 @@ haskell_register_ghc_nixpkgs(

# Used by Windows
haskell_register_ghc_bindists(
compiler_flags = common_ghc_flags,
version = "8.6.5",
) if is_windows else None

Expand Down
3 changes: 3 additions & 0 deletions unreleased.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ HEAD — ongoing

+ [Documentation] Added platform-independent tips for testing
+ [DAML Compiler] Some issues that caused ``damlc test`` to crash on shutdown have been fixed.
+ [DAML Compiler] The DAML compiler was accidentally compiled without
optimizations on Windows. This has been fixed which should improve
the performance of ``damlc`` and ``daml studio`` on Windows.