Skip to content

Set optlevel to 1 #520

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

Merged
merged 1 commit into from
Sep 3, 2020
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
4 changes: 4 additions & 0 deletions src/GLib/GLib.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
module GLib

if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel"))
@eval Base.Experimental.@optlevel 1
end

# Import `libgobject` and whatnot
using Glib_jll

Expand Down
5 changes: 5 additions & 0 deletions src/GLib/MutableTypes.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module MutableTypes

if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel"))
@eval Base.Experimental.@optlevel 1
end

export mutable, Mutable, deref

abstract type Mutable{T} end
Expand Down
8 changes: 6 additions & 2 deletions src/Gtk.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# julia Gtk interface
module Gtk

if isdefined(Base, :Experimental) && isdefined(Base.Experimental, Symbol("@optlevel"))
@eval Base.Experimental.@optlevel 1
end

# Import binary definitions
using GTK3_jll, Glib_jll, Xorg_xkeyboard_config_jll, gdk_pixbuf_jll, adwaita_icon_theme_jll, hicolor_icon_theme_jll
using Pkg.Artifacts
Expand Down Expand Up @@ -107,12 +111,12 @@ function __init__()
force=true
)
end

if Sys.iswindows()
# needed on windows for correct window decorations (issue 355)
ENV["GTK_CSD"] = 0
end

# Point gdk to our cached loaders
ENV["GDK_PIXBUF_MODULE_FILE"] = joinpath(artifact_path(loaders_cache_hash), "loaders.cache")
ENV["GDK_PIXBUF_MODULEDIR"] = gdk_pixbuf_loaders_dir
Expand Down