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

Do not pass -runtime-variant _pic on Windows #635

Merged
2 commits merged into from
Mar 19, 2018
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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ next
everything in the universe. Jbuilder cannot cache the result of an action that
depend on the universe (#603, fixes #255 @diml)

- Don't pass `-runtime-variant _pic` on Windows (#635)

1.0+beta19 (14/03/2018)
-----------------------

Expand Down
9 changes: 8 additions & 1 deletion src/exe.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ module Linkage = struct
}

let o_flags = ["-output-complete-obj"]
let so_flags = ["-output-complete-obj"; "-runtime-variant"; "_pic"]
let so_flags_windows = o_flags
let so_flags_unix = ["-output-complete-obj"; "-runtime-variant"; "_pic"]

let of_user_config (ctx : Context.t) (m : Jbuild.Executables.Link_mode.t) =
let wanted_mode : Mode.t =
Expand Down Expand Up @@ -80,6 +81,12 @@ module Linkage = struct
[]
| Object -> o_flags
| Shared_object ->
let so_flags =
if ctx.os_type = "Win32" then
so_flags_windows
else
so_flags_unix
in
if real_mode = Native then
(* The compiler doesn't pass these flags in native mode. This
looks like a bug in the compiler. *)
Expand Down