diff --git a/compiler/msg/errore.msg b/compiler/msg/errore.msg index 9a68ab826e..feb4e8b209 100644 --- a/compiler/msg/errore.msg +++ b/compiler/msg/errore.msg @@ -3522,7 +3522,7 @@ unit_w_unsupported_esp_idf_version=10071_W_Unsupported esp-idf version # # Options # -# 11068 is the last used one +# 11069 is the last used one # # BeginOfTeX % @@ -3692,6 +3692,7 @@ option_subtarget_config_not_found=11066_E_Subtarget $1 specified but no correspo % Displayed if more than one \var{-t} option is specified. option_x_ignored=11067_N_Ignoring compiler executable suffix $1. % Displayed if more than one \var{-t} option is specified. +option_wasm_threads_require_external_linker=11069_N_WebAssembly multithreading is not supported by the internal linker, switching to external linking % \end{description} # EndOfTeX diff --git a/compiler/options.pas b/compiler/options.pas index 0dcad79c6b..087af9397f 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -2245,6 +2245,13 @@ begin Message(option_too_many_exception_modes); StopOptions(1); end; + + if (ts_wasm_threads in init_settings.targetswitches) and + not (cs_link_extern in init_settings.globalswitches) then + begin + Message(option_wasm_threads_require_external_linker); + include(init_settings.globalswitches,cs_link_extern); + end; {$endif} {$ifdef i8086}