mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
build system: always enable presym for mrbc build
Remove disable_presym from mrbc_build and cross-build fallback. Add explicit object file dependencies on presym headers in presym.rake to prevent compilation before headers are generated. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,5 +7,4 @@ MRuby::Build.new do |conf|
|
||||
|
||||
conf.build_mrbc_exec
|
||||
conf.disable_libmruby
|
||||
conf.disable_presym
|
||||
end
|
||||
|
||||
+2
-14
@@ -156,11 +156,7 @@ module MRuby
|
||||
current.instance_eval(&block)
|
||||
ensure
|
||||
if current.libmruby_enabled? && !current.mrbcfile_external?
|
||||
if current.presym_enabled?
|
||||
current.create_mrbc_build if current.host? || current.gems["mruby-bin-mrbc"]
|
||||
elsif current.host?
|
||||
current.build_mrbc_exec
|
||||
end
|
||||
current.create_mrbc_build if current.host? || current.gems["mruby-bin-mrbc"]
|
||||
end
|
||||
current.presym = Presym.new(current) if current.presym_enabled?
|
||||
end
|
||||
@@ -192,13 +188,6 @@ module MRuby
|
||||
@enable_presym
|
||||
end
|
||||
|
||||
def disable_presym
|
||||
if @enable_presym
|
||||
@enable_presym = false
|
||||
compilers.each{|c| c.defines << "MRB_NO_PRESYM"}
|
||||
end
|
||||
end
|
||||
|
||||
def disable_lock
|
||||
@enable_lock = false
|
||||
end
|
||||
@@ -569,7 +558,7 @@ EOS
|
||||
end
|
||||
build.build_mrbc_exec
|
||||
build.disable_libmruby
|
||||
build.disable_presym
|
||||
build.presym = Presym.new(build) if build.presym_enabled?
|
||||
@mrbc_build = build
|
||||
self.mrbcfile = build.mrbcfile
|
||||
build
|
||||
@@ -592,7 +581,6 @@ EOS
|
||||
conf.toolchain
|
||||
conf.build_mrbc_exec
|
||||
conf.disable_libmruby
|
||||
conf.disable_presym
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -44,5 +44,15 @@ MRuby.each_target do |build|
|
||||
end
|
||||
end
|
||||
|
||||
# Ensure object files depend on presym headers being generated.
|
||||
# This is necessary for sub-builds (e.g., mrbc) whose compilation
|
||||
# may be triggered during another build's presym scanning.
|
||||
prereqs.each_key do |prereq|
|
||||
next unless File.extname(prereq) == build.exts.object
|
||||
next unless prereq.start_with?(build_dir)
|
||||
next if mrbc_build_dir && prereq.start_with?(mrbc_build_dir)
|
||||
file prereq => presym.list_path
|
||||
end
|
||||
|
||||
gensym_task.enhance([presym.list_path])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user