Skip to content
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: 1 addition & 1 deletion lib/easy_compile/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def print_normalized_platform

def run_rake_tasks!(*tasks)
all_tasks = tasks.join(" ")
rakelibdir = File.expand_path("tasks", __dir__)
rakelibdir = [File.expand_path("tasks", __dir__), "rakelib"].join(File::PATH_SEPARATOR)
rake_compiler_path = Gem.loaded_specs["rake-compiler"].full_require_paths
rake_specs = Gem.loaded_specs["rake"]
rake_executable = rake_specs.bin_file("rake")
Expand Down
2 changes: 2 additions & 0 deletions lib/easy_compile/compilation_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def with_mkmf_monkey_patch

instance = self

previous_create_makefile = method(:create_makefile)
Object.define_method(:create_makefile) do |name, *args|
instance.binary_name = name
previous_create_makefile.call(name, *args)
end

Object.define_method(:create_rust_makefile) do |name, *args|
Expand Down
4 changes: 4 additions & 0 deletions lib/easy_compile/tasks/wrapper.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ require_relative "../compilation_tasks"
task = EasyCompile::CompilationTasks.new(!Rake::Task.task_defined?(:package))

task "easy_compile:setup" do
Rake.application.instance_variable_get(:@tasks).delete_if do |name, _|
name == "native:#{task.gemspec.name}:#{task.normalized_platform}"
end

task.setup
end

Expand Down