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

Exclusive profiling mode #896

Merged
merged 5 commits into from
May 27, 2019
Merged

Exclusive profiling mode #896

merged 5 commits into from
May 27, 2019

Conversation

aherrmann
Copy link
Member

Closes #895

  • When profiling mode is active (compilation_mode == "dbg") then we compile only profiling libraries and binaries instead of compiling both profiling and non-profiling. In profiling mode the toolchain libraries only carry their static archives, as profiling mode doesn't provide any shared libraries.
  • Some test cases strictly require shared objects. Those are disabled in profiling mode.

Wrt. #438 this PR goes further down the road of -fexternal-interpreter. Given the large performance penalty that that implies we may yet want to compile non-profiling objects for GHCi/Template Haskell. However, as mentioned in #895 it seems better to not expose these in the CcInfo provider, but instead handle them separately in HaskellInfo.

@aherrmann aherrmann requested review from guibou and mboes May 24, 2019 10:45
aherrmann added 3 commits May 27, 2019 11:52
When profiling mode is active (`compilation_mode == "dbg"`) then we
compile only profiling libraries and binaries instead of compiling both.

The toolchain libraries then only carry their static archives, as
profiling mode doesn't provide any shared libraries.

Some test cases strictly require shared objects. Those are disabled in
profiling mode.
If suffix was empty the returned library name would be empty, causing
linker errors down the line.
aherrmann added 2 commits May 27, 2019 13:51
Bazel does not allow nested select statements. It also doesn't allow
ambiguous select statements. With the custom
`fastbuild_(windows|darwin)` conditions there would be ambiguity between
`:debug_build` and `windows|darwin` if `-c dbg` is set.
@aherrmann
Copy link
Member Author

CI is green now. The handling of //debug/linking_utils:test-ldd on Darwin in bazel test prof is not very satisfactory. In .circleci/config.yml we're setting echo "common:ci --test_tag_filters -dont_test_on_darwin" >> .bazelrc.local. However, it seems that these filters don't compose and passing an additional --test_tag_filters argument within RunTests.hs overrides the original filter. So, 798ec96 simply replicates the original filter within RunTests.hs on Darwin.

@mboes mboes merged commit da112ad into master May 27, 2019
@mboes mboes deleted the profiling_only branch May 27, 2019 19:21
Xophmeister added a commit that referenced this pull request Dec 15, 2021
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.

CcInfo does not take profiling mode into account
2 participants