diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-11-30 11:47:14 +0100 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2015-11-30 11:47:14 +0100 |
| commit | 13f8c6f64c31e1f15c185dcb53fff200ccd4af18 (patch) | |
| tree | a80e6aa42c261f8f3bb859de38ddb5015776ce47 /src | |
| parent | d05f0f2581f39c1b88c469b1c48a6b2ec4d9cc96 (diff) | |
| parent | b51f678cefbb43e8bc521a83e9830e4cb845a698 (diff) | |
| download | rabbitmq-server-git-13f8c6f64c31e1f15c185dcb53fff200ccd4af18.tar.gz | |
Merge branch 'rabbitmq-server-455'
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index b3e6c95438..2f9b427c27 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -281,8 +281,21 @@ hipe_compile() -> io:format("~nHiPE compiling: |~s|~n |", [string:copies("-", Count)]), T1 = time_compat:monotonic_time(), + %% We use code:get_object_code/1 below to get the beam binary, + %% instead of letting hipe get it itself, because hipe:c/{1,2} + %% expects the given filename to actually exist on disk: it does not + %% work with an EZ archive (rabbit_common is one). + %% + %% Then we use the mode advanced hipe:compile/4 API because the + %% simpler hipe:c/3 is not exported (as of Erlang 18.1.4). This + %% advanced API does not load automatically the code, except if the + %% 'load' option is set. PidMRefs = [spawn_monitor(fun () -> [begin - {ok, M} = hipe:c(M, [o3]), + {M, Beam, _} = + code:get_object_code(M), + {ok, _} = + hipe:compile(M, [], Beam, + [o3, load]), io:format("#") end || M <- Ms] end) || |
