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

[cr92 followup] Revert using precompiled headers with unit/browser tests targets. #16877

Closed
mkarolin opened this issue Jul 9, 2021 · 0 comments · Fixed by brave/brave-core#9389

Comments

@mkarolin
Copy link
Contributor

mkarolin commented Jul 9, 2021

Using precompiled headers is causing an intermittent build error with brave_unit_tests on Windows:

../../brave/vendor/brave_base/random_unittest.cc(92,22): error: use of undeclared identifier 'M_LN2'
  EXPECT_DOUBLE_EQ(3*M_LN2, StdExponential(0, 0.25));
                     ^

This is because M_LN2 on Windows requires defining _USE_MATH_DEFINES before including <cmath>. We also include <cmath> from other unit tests, but without the macro defined. Depending on which file gets compiled first the precompiled header for cmath may end up with or without M_LN2 being defined.

Let's revert using precompiled headers for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants