Remove cmake EMSCRIPTEN_FORCE_COMPILERS feature
This features was turned off by default in #23537. I'm not sure there is any value in maintaining it anymore. Shortcutting the cmake configuration process was more valuable in the past when emscripten was slower.
If the speed of running cmake continues to be real concern I think we should instead focus on optimizing emcc performance rather than bypassing cmake checks.
Since this option was only turned off by default in 4.0.2 we could wait a few more releases before removing it? Its conceivable that some users might be depending on this for some reason.
Yeah, I would wait some more. Perhaps in a few months? That way we may get more feedback as people update, and not everyone does every month.
#23537 shipped in 4.0.3 and we haven't heard anything about this issue yet.
I propose that we land this soon-ish since its already causing issue on my desktop machine to use EMSCRIPTEN_FORCE_COMPILERS being out-of-date with the latest cmake/compilers:
======================================================================
FAIL: test_cmake_compile_features_force (test_other.other.test_cmake_compile_features_force)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.12/unittest/case.py", line 58, in testPartExecutor
yield
File "/usr/lib/python3.12/unittest/case.py", line 634, in run
self._callTestMethod(testMethod)
File "/usr/lib/python3.12/unittest/case.py", line 589, in _callTestMethod
if method() is not None:
^^^^^^^^
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 895, in resulting_test
return func(self, *args)
^^^^^^^^^^^^^^^^^
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/test_other.py", line 961, in test_cmake_compile_features
self.assertTextDataIdentical(native_features, emscripten_features)
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1582, in assertTextDataIdentical
return self.assertIdentical(text1, text2, msg, fromfile, tofile)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/google/home/sbc/dev/wasm/emscripten/test/common.py", line 1601, in assertIdentical
self.fail(fail_message)
File "/usr/lib/python3.12/unittest/case.py", line 715, in fail
raise self.failureException(msg)
AssertionError: Unexpected difference:
--- expected
+++ actual
@@ -5,7 +5,7 @@
-- *** CMAKE_C90_COMPILE_FEATURES is c_std_90;c_function_prototypes
-- *** CMAKE_C99_COMPILE_FEATURES is c_std_99;c_restrict;c_variadic_macros
-- *** CMAKE_C11_COMPILE_FEATURES is c_std_11;c_static_assert
--- *** CMAKE_CXX_COMPILE_FEATURES is cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_i[..]
+-- *** CMAKE_CXX_COMPILE_FEATURES is cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_i[..]
-- *** CMAKE_CXX98_COMPILE_FEATURES is cxx_std_98;cxx_template_template_parameters
-- *** CMAKE_CXX11_COMPILE_FEATURES is cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx[..]
-- *** CMAKE_CXX14_COMPILE_FEATURES is cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates
For full output run with --verbose.