Issue #14445 has been updated by larskanis (Lars Kanis).


I have to thank you for getting the whole MJIT train forward!

Unfortunately on Windows the startup times of GCC are so crazy slow, that MJIT is rarely useful. An idea is to bundle several iseq units from the queue to one compiler run. In a very simple test I was able to combine more than 10 iseqs without significantly increasing the compile time. Is this something you could imagine?


----------------------------------------
Bug #14445: MJIT: Determine path of mjit header and libruby at runtime
https://bugs.ruby-lang.org/issues/14445#change-70196

* Author: larskanis (Lars Kanis)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-02-05 trunk 62211) [x64-mingw32]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I'm pleased to see that the MJIT pull request has been merged and that my [initial Windows port](https://github.com/vnmakarov/ruby/pull/4) has been integrated as well! One part of this patch was to avoid builtin absolute paths in the binary. This part was not merged.

The current MJIT implementation uses the install prefix at build time as part of the include and library paths for gcc/clang at runtime. If ruby is distributed as pre-compiled binary, these paths can differ between build and runtime. This applies in particular to the Windows RubyInstaller, where a user defined directory is used to store the binaries.

So for RubyInstaller I'm using [this patch](https://github.com/oneclick/rubyinstaller2-packages/blob/master/mingw-w64-ruby-head/0001-MJIT-Determine-path-of-mjit-header-and-libruby-at-ru.patch) to determine the paths based on the ruby top directory and to compile only relative paths into the binary. There's probably a cleaner approach to do this, but since ruby has always been fully path-relocatable, I think this should be fixed for MJIT as well.


---Files--------------------------------
0001-MJIT-Determine-path-of-mjit-header-and-libruby-at-ru.patch (6.29 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>