Remove HiPE
This commit is contained in:
parent
a48fcbaac1
commit
9b828c08b7
|
@ -1,99 +0,0 @@
|
||||||
## This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
## License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
##
|
|
||||||
## Copyright (c) 2007-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
|
|
||||||
|
|
||||||
defmodule RabbitMQ.CLI.Ctl.Commands.HipeCompileCommand do
|
|
||||||
@moduledoc """
|
|
||||||
HiPE support has been deprecated since Erlang/OTP 22 (mid-2019) and
|
|
||||||
won't be a part of Erlang/OTP 24.
|
|
||||||
|
|
||||||
Therefore this command is DEPRECATED and is no-op.
|
|
||||||
"""
|
|
||||||
|
|
||||||
alias RabbitMQ.CLI.Core.{DocGuide, Validators}
|
|
||||||
import RabbitMQ.CLI.Core.CodePath
|
|
||||||
|
|
||||||
@behaviour RabbitMQ.CLI.CommandBehaviour
|
|
||||||
|
|
||||||
#
|
|
||||||
# API
|
|
||||||
#
|
|
||||||
|
|
||||||
def distribution(_), do: :none
|
|
||||||
|
|
||||||
use RabbitMQ.CLI.Core.MergesNoDefaults
|
|
||||||
|
|
||||||
def validate([], _), do: {:validation_failure, :not_enough_args}
|
|
||||||
|
|
||||||
def validate([target_dir], opts) do
|
|
||||||
:ok
|
|
||||||
|> Validators.validate_step(fn ->
|
|
||||||
case acceptable_path?(target_dir) do
|
|
||||||
true -> :ok
|
|
||||||
false -> {:error, {:bad_argument, "Target directory path cannot be blank"}}
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|> Validators.validate_step(fn ->
|
|
||||||
case File.dir?(target_dir) do
|
|
||||||
true ->
|
|
||||||
:ok
|
|
||||||
|
|
||||||
false ->
|
|
||||||
case File.mkdir_p(target_dir) do
|
|
||||||
:ok ->
|
|
||||||
:ok
|
|
||||||
|
|
||||||
{:error, perm} when perm == :eperm or perm == :eacces ->
|
|
||||||
{:error,
|
|
||||||
{:bad_argument,
|
|
||||||
"Cannot create target directory #{target_dir}: insufficient permissions"}}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|> Validators.validate_step(fn -> require_rabbit(opts) end)
|
|
||||||
end
|
|
||||||
|
|
||||||
def validate(_, _), do: {:validation_failure, :too_many_args}
|
|
||||||
|
|
||||||
def run([_target_dir], _opts) do
|
|
||||||
:ok
|
|
||||||
end
|
|
||||||
|
|
||||||
use RabbitMQ.CLI.DefaultOutput
|
|
||||||
|
|
||||||
def usage, do: "hipe_compile <directory>"
|
|
||||||
|
|
||||||
def usage_additional do
|
|
||||||
[
|
|
||||||
["<directory>", "Target directory for HiPE-compiled modules"]
|
|
||||||
]
|
|
||||||
end
|
|
||||||
|
|
||||||
def usage_doc_guides() do
|
|
||||||
[
|
|
||||||
DocGuide.configuration(),
|
|
||||||
DocGuide.erlang_versions()
|
|
||||||
]
|
|
||||||
end
|
|
||||||
|
|
||||||
def help_section(), do: :deprecated
|
|
||||||
|
|
||||||
def description() do
|
|
||||||
"DEPRECATED. This command is a no-op. HiPE is no longer supported by modern Erlang versions"
|
|
||||||
end
|
|
||||||
|
|
||||||
def banner([_target_dir], _) do
|
|
||||||
"This command is a no-op. HiPE is no longer supported by modern Erlang versions"
|
|
||||||
end
|
|
||||||
|
|
||||||
#
|
|
||||||
# Implementation
|
|
||||||
#
|
|
||||||
|
|
||||||
# Accepts any non-blank path
|
|
||||||
defp acceptable_path?(value) do
|
|
||||||
String.length(String.trim(value)) != 0
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -55,7 +55,6 @@ rabbitConfigKeys=(
|
||||||
default_pass
|
default_pass
|
||||||
default_user
|
default_user
|
||||||
default_vhost
|
default_vhost
|
||||||
hipe_compile
|
|
||||||
vm_memory_high_watermark
|
vm_memory_high_watermark
|
||||||
)
|
)
|
||||||
fileConfigKeys=(
|
fileConfigKeys=(
|
||||||
|
@ -267,7 +266,7 @@ rabbit_env_config() {
|
||||||
local val="${!var:-}"
|
local val="${!var:-}"
|
||||||
local rawVal="$val"
|
local rawVal="$val"
|
||||||
case "$conf" in
|
case "$conf" in
|
||||||
fail_if_no_peer_cert|hipe_compile)
|
fail_if_no_peer_cert)
|
||||||
case "${val,,}" in
|
case "${val,,}" in
|
||||||
false|no|0|'') rawVal='false' ;;
|
false|no|0|'') rawVal='false' ;;
|
||||||
true|yes|1|*) rawVal='true' ;;
|
true|yes|1|*) rawVal='true' ;;
|
||||||
|
|
|
@ -146,7 +146,6 @@ RUN set -eux; \
|
||||||
--prefix="$ERLANG_INSTALL_PATH_PREFIX" \
|
--prefix="$ERLANG_INSTALL_PATH_PREFIX" \
|
||||||
--host="$hostArch" \
|
--host="$hostArch" \
|
||||||
--build="$buildArch" \
|
--build="$buildArch" \
|
||||||
--disable-hipe \
|
|
||||||
--disable-sctp \
|
--disable-sctp \
|
||||||
--disable-silent-rules \
|
--disable-silent-rules \
|
||||||
--enable-builtin-zlib \
|
--enable-builtin-zlib \
|
||||||
|
@ -166,7 +165,6 @@ RUN set -eux; \
|
||||||
--without-et \
|
--without-et \
|
||||||
--without-eunit \
|
--without-eunit \
|
||||||
--without-ftp \
|
--without-ftp \
|
||||||
--without-hipe \
|
|
||||||
--without-jinterface \
|
--without-jinterface \
|
||||||
--without-megaco \
|
--without-megaco \
|
||||||
--without-observer \
|
--without-observer \
|
||||||
|
@ -329,4 +327,4 @@ RUN set eux; \
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
rabbitmqadmin --version
|
rabbitmqadmin --version
|
||||||
|
|
||||||
EXPOSE 15671 15672
|
EXPOSE 15671 15672
|
||||||
|
|
Loading…
Reference in New Issue