Skip to content

Commit

Permalink
Fix a few misordered Windows libraries
Browse files Browse the repository at this point in the history
Due to pkgconf/pkgconf#268, we manually
worked around Windows link order issues by adding abseil libraries
manually. However, a few libraries were missed from that list, which
are added only in Windows builds:

* dbghelp
* advapi32

This commit adds these libraries to the right location, which fixes
`x86-mingw32` builds.

Note there is an existing issue with abseil including `-ldbghelp`
before `-labsl_symbolize`, which this commit corrects:
abseil/abseil-cpp#1497
  • Loading branch information
stanhu authored and mudge committed Jul 30, 2023
1 parent dd5a319 commit 61956d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/re2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ def build_with_system_libraries
# --libs --static`, resulting in build failures: https://github.com/pkgconf/pkgconf/issues/268.
# To work around the issue, store the correct order of abseil flags here and add them manually
# for Windows.
#
# Note that `-ldbghelp` is incorrectly added before `-labsl_symbolize` in abseil:
# https://github.com/abseil/abseil-cpp/issues/1497
ABSL_LDFLAGS = %w[
-labsl_flags
-labsl_flags_internal
Expand Down Expand Up @@ -302,13 +305,15 @@ def build_with_system_libraries
-labsl_graphcycles_internal
-labsl_stacktrace
-labsl_symbolize
-ldbghelp
-labsl_debugging_internal
-labsl_demangle_internal
-labsl_malloc_internal
-labsl_time
-labsl_civil_time
-labsl_strings
-labsl_strings_internal
-ladvapi32
-labsl_base
-labsl_spinlock_wait
-labsl_int128
Expand Down

0 comments on commit 61956d4

Please sign in to comment.