diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
index cac9d61ce..4f8014014 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -181,7 +181,7 @@ class Conf:
         core_options = {k: o for k, o in self.coredata.builtins.items() if k in core_option_names}
 
         self.print_options('Core options', core_options)
-        if self.build.environment.is_cross_build():
+        if self.default_values_only or self.build.environment.is_cross_build():
             self.print_options('Core options (for host machine)', self.coredata.builtins_per_machine.host)
             self.print_options(
                 'Core options (for build machine)',
@@ -190,7 +190,7 @@ class Conf:
             self.print_options('Core options', self.coredata.builtins_per_machine.host)
         self.print_options('Backend options', self.coredata.backend_options)
         self.print_options('Base options', self.coredata.base_options)
-        if self.build.environment.is_cross_build():
+        if self.default_values_only or self.build.environment.is_cross_build():
             self.print_options('Compiler options (for host machine)', self.coredata.compiler_options.host)
             self.print_options(
                 'Compiler options (for build machine)',

Running "meson configure" in source directory raises an exception (yet again)
Yes, it's Taisei again. Ping @mensinda.

If it helps, the taisei commit is https://github.com/taisei-project/taisei/commit/e68bfdb2ea86470fd138044af83af610de0b9d68

```
[0] [akari@navi] [master ← /data/git/taisei]
 % c
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
Unable to evaluate subdir([]) in AstInterpreter --> Skipping
WARNING: The source directory instead of the build directory was specified.
WARNING: Only the default values for the project are printed, and all command line parameters are ignored.

Core properties:
  Source dir /data/git/taisei

Core options:
  Option          Default Value Possible Values                                          Description                                             
  ------          ------------- ---------------                                          -----------                                             
  auto_features   auto          [enabled, disabled, auto]                                Override value of all 'auto' features                   
  backend         ninja         [ninja, vs, vs2010, vs2015, vs2017, vs2019, xcode]       Backend to use                                          
  buildtype       release       [plain, debug, debugoptimized, release, minsize, custom] Build type to use                                       
  debug           false         [true, false]                                            Debug                                                   
  default_library static        [shared, static, both]                                   Default library type                                    
  install_umask   0022          [preserve, 0000-0777]                                    Default umask to apply on permissions of installed files
  layout          mirror        [mirror, flat]                                           Build directory layout                                  
  optimization    3             [0, g, 1, 2, 3, s]                                       Optimization level                                      
  strip           true          [true, false]                                            Strip targets on install                                
  unity           off           [on, off, subprojects]                                   Unity build                                             
  warning_level   1             [0, 1, 2, 3]                                             Compiler warning level to use                           
  werror          false         [true, false]                                            Treat warnings as errors                                
  wrap_mode       default       [default, nofallback, nodownload, forcefallback]         Wrap mode                                               
Traceback (most recent call last):
  File "/data/git/meson/mesonbuild/mesonmain.py", line 129, in run
    return options.run_func(options)
  File "/data/git/meson/mesonbuild/mconf.py", line 216, in run
    c.print_conf()
  File "/data/git/meson/mesonbuild/mconf.py", line 184, in print_conf
    if self.build.environment.is_cross_build():
AttributeError: 'NoneType' object has no attribute 'environment'
```
diff --git a/run_unittests.py b/run_unittests.py
index f06be23ae..8cc981148 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3624,6 +3624,10 @@ recommended as it is not supported on some platforms''')
         self.maxDiff = None
         self.assertListEqual(res_nb, res_wb)
 
+    def test_meson_configure_from_source_does_not_crash(self):
+        testdir = os.path.join(self.unit_test_dir, '59 introspect buildoptions')
+        self._run(self.mconf_command + [testdir])
+
     def test_introspect_json_dump(self):
         testdir = os.path.join(self.unit_test_dir, '57 introspection')
         self.init(testdir)

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y ninja-build
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup==1.2.2
iniconfig==2.1.0
-e git+https://github.com/mesonbuild/meson.git@ad368cfc07b1bac1aa00e51038e749040cc2dea0#egg=meson
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
tomli==2.2.1

name: meson
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - exceptiongroup==1.2.2
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - tomli==2.2.1
prefix: /opt/conda/envs/meson

run_unittests.py::AllPlatformTests::test_meson_configure_from_source_does_not_crash
run_unittests.py::DataTests::test_compiler_options_documented run_unittests.py::DataTests::test_json_grammar_syntax_highlighting run_unittests.py::AllPlatformTests::test_absolute_prefix_libdir run_unittests.py::AllPlatformTests::test_always_prefer_c_compiler_for_asm run_unittests.py::AllPlatformTests::test_check_module_linking run_unittests.py::AllPlatformTests::test_compiler_detection run_unittests.py::AllPlatformTests::test_default_options_prefix run_unittests.py::AllPlatformTests::test_introspect_buildoptions_without_configured_build run_unittests.py::AllPlatformTests::test_introspect_config_update run_unittests.py::AllPlatformTests::test_introspect_dependencies_from_source run_unittests.py::AllPlatformTests::test_introspect_file_dump_equals_all run_unittests.py::AllPlatformTests::test_introspect_json_dump run_unittests.py::AllPlatformTests::test_introspect_meson_info run_unittests.py::AllPlatformTests::test_introspect_targets_from_source run_unittests.py::AllPlatformTests::test_preprocessor_checks_CPPFLAGS run_unittests.py::AllPlatformTests::test_templates run_unittests.py::AllPlatformTests::test_warning_level_0 run_unittests.py::FailureTests::test_boost_BOOST_ROOT_dependency run_unittests.py::FailureTests::test_boost_notfound_dependency run_unittests.py::FailureTests::test_dependency_invalid_method run_unittests.py::FailureTests::test_extraframework_dependency_method run_unittests.py::FailureTests::test_get_variable_on_not_found_project run_unittests.py::FailureTests::test_gnustep_notfound_dependency run_unittests.py::FailureTests::test_llvm_dependency run_unittests.py::FailureTests::test_missing_subproject_not_required_and_required run_unittests.py::FailureTests::test_sdl2_notfound_dependency run_unittests.py::FailureTests::test_using_recent_feature run_unittests.py::FailureTests::test_using_too_recent_feature run_unittests.py::FailureTests::test_using_too_recent_feature_dependency run_unittests.py::FailureTests::test_vcs_tag_featurenew_build_always_stale run_unittests.py::FailureTests::test_wx_notfound_dependency run_unittests.py::LinuxlikeTests::test_build_rpath run_unittests.py::LinuxlikeTests::test_compiler_check_flags_order run_unittests.py::LinuxlikeTests::test_compiler_cpp_stds run_unittests.py::LinuxlikeTests::test_cpp_std_override run_unittests.py::LinuxlikeTests::test_noncross_options run_unittests.py::LinuxlikeTests::test_pch_with_address_sanitizer run_unittests.py::RewriterTests::test_default_options_delete run_unittests.py::RewriterTests::test_default_options_set run_unittests.py::RewriterTests::test_kwargs_add run_unittests.py::RewriterTests::test_kwargs_delete run_unittests.py::RewriterTests::test_kwargs_info run_unittests.py::RewriterTests::test_kwargs_remove run_unittests.py::RewriterTests::test_kwargs_remove_regex run_unittests.py::RewriterTests::test_kwargs_set run_unittests.py::RewriterTests::test_target_add_sources run_unittests.py::RewriterTests::test_target_add_sources_abs run_unittests.py::RewriterTests::test_target_remove run_unittests.py::RewriterTests::test_target_remove_sources run_unittests.py::RewriterTests::test_target_same_name_skip run_unittests.py::RewriterTests::test_target_source_list run_unittests.py::RewriterTests::test_target_source_sorting run_unittests.py::RewriterTests::test_tatrget_add run_unittests.py::NativeFileTests::test_cpp_compiler
run_unittests.py::InternalTests::test_compiler_args_class run_unittests.py::InternalTests::test_compiler_args_class_gnuld run_unittests.py::InternalTests::test_extract_as_list run_unittests.py::InternalTests::test_find_library_patterns run_unittests.py::InternalTests::test_listify run_unittests.py::InternalTests::test_mode_symbolic_to_bits run_unittests.py::InternalTests::test_needs_exe_wrapper_override run_unittests.py::InternalTests::test_pkgconfig_module run_unittests.py::InternalTests::test_pkgconfig_parse_libs run_unittests.py::InternalTests::test_quote_arg run_unittests.py::InternalTests::test_split_args run_unittests.py::InternalTests::test_string_templates_substitution run_unittests.py::InternalTests::test_version_compare run_unittests.py::InternalTests::test_version_number run_unittests.py::DataTests::test_all_functions_defined_in_ast_interpreter run_unittests.py::DataTests::test_builtin_options_documented run_unittests.py::DataTests::test_cpu_families_documented run_unittests.py::DataTests::test_markdown_files_in_sitemap run_unittests.py::DataTests::test_snippets run_unittests.py::DataTests::test_vim_syntax_highlighting run_unittests.py::AllPlatformTests::test_alias_target run_unittests.py::AllPlatformTests::test_all_forbidden_targets_tested run_unittests.py::AllPlatformTests::test_array_option_bad_change run_unittests.py::AllPlatformTests::test_array_option_change run_unittests.py::AllPlatformTests::test_array_option_empty_equivalents run_unittests.py::AllPlatformTests::test_build_by_default run_unittests.py::AllPlatformTests::test_buildtype_setting run_unittests.py::AllPlatformTests::test_clike_get_library_dirs run_unittests.py::AllPlatformTests::test_command_line run_unittests.py::AllPlatformTests::test_compiler_run_command run_unittests.py::AllPlatformTests::test_configure_file_warnings run_unittests.py::AllPlatformTests::test_conflicting_d_dash_option run_unittests.py::AllPlatformTests::test_cross_file_system_paths run_unittests.py::AllPlatformTests::test_custom_target_changes_cause_rebuild run_unittests.py::AllPlatformTests::test_custom_target_exe_data_deterministic run_unittests.py::AllPlatformTests::test_dash_d_dedup run_unittests.py::AllPlatformTests::test_default_options_prefix_dependent_defaults run_unittests.py::AllPlatformTests::test_dirs run_unittests.py::AllPlatformTests::test_dist_git run_unittests.py::AllPlatformTests::test_dist_git_script run_unittests.py::AllPlatformTests::test_dist_hg run_unittests.py::AllPlatformTests::test_do_conf_file_preserve_newlines run_unittests.py::AllPlatformTests::test_env_ops_dont_stack run_unittests.py::AllPlatformTests::test_feature_check_usage_subprojects run_unittests.py::AllPlatformTests::test_flock run_unittests.py::AllPlatformTests::test_forcefallback run_unittests.py::AllPlatformTests::test_free_stringarray_setting run_unittests.py::AllPlatformTests::test_guessed_linker_dependencies run_unittests.py::AllPlatformTests::test_identical_target_name_in_subdir_flat_layout run_unittests.py::AllPlatformTests::test_identical_target_name_in_subproject_flat_layout run_unittests.py::AllPlatformTests::test_install_introspection run_unittests.py::AllPlatformTests::test_install_introspection_multiple_outputs run_unittests.py::AllPlatformTests::test_install_subdir_introspection run_unittests.py::AllPlatformTests::test_internal_include_order run_unittests.py::AllPlatformTests::test_introspect_projectinfo_subproject_dir run_unittests.py::AllPlatformTests::test_introspect_projectinfo_subproject_dir_from_source run_unittests.py::AllPlatformTests::test_introspect_projectinfo_subprojects run_unittests.py::AllPlatformTests::test_introspect_projectinfo_without_configured_build run_unittests.py::AllPlatformTests::test_introspection_target_subproject run_unittests.py::AllPlatformTests::test_libdir_must_be_inside_prefix run_unittests.py::AllPlatformTests::test_minor_version_does_not_reconfigure_wipe run_unittests.py::AllPlatformTests::test_ndebug_if_release_disabled run_unittests.py::AllPlatformTests::test_ndebug_if_release_enabled run_unittests.py::AllPlatformTests::test_permitted_method_kwargs run_unittests.py::AllPlatformTests::test_prebuilt_object run_unittests.py::AllPlatformTests::test_prebuilt_shared_lib run_unittests.py::AllPlatformTests::test_prebuilt_static_lib run_unittests.py::AllPlatformTests::test_prefix_dependent_defaults run_unittests.py::AllPlatformTests::test_reconfigure run_unittests.py::AllPlatformTests::test_rpath_uses_ORIGIN run_unittests.py::AllPlatformTests::test_run_target_files_path run_unittests.py::AllPlatformTests::test_same_d_option_twice run_unittests.py::AllPlatformTests::test_same_d_option_twice_configure run_unittests.py::AllPlatformTests::test_same_dash_option_twice run_unittests.py::AllPlatformTests::test_same_dash_option_twice_configure run_unittests.py::AllPlatformTests::test_same_project_d_option_twice run_unittests.py::AllPlatformTests::test_same_project_d_option_twice_configure run_unittests.py::AllPlatformTests::test_source_changes_cause_rebuild run_unittests.py::AllPlatformTests::test_source_generator_program_cause_rebuild run_unittests.py::AllPlatformTests::test_static_compile_order run_unittests.py::AllPlatformTests::test_static_library_lto run_unittests.py::AllPlatformTests::test_static_library_overwrite run_unittests.py::AllPlatformTests::test_subproject_promotion run_unittests.py::AllPlatformTests::test_subproject_promotion_wrap run_unittests.py::AllPlatformTests::test_suite_selection run_unittests.py::AllPlatformTests::test_target_construct_id_from_path run_unittests.py::AllPlatformTests::test_testsetup_default run_unittests.py::AllPlatformTests::test_testsetup_selection run_unittests.py::AllPlatformTests::test_uninstall run_unittests.py::AllPlatformTests::test_unstable_coredata run_unittests.py::AllPlatformTests::test_warning_location run_unittests.py::AllPlatformTests::test_wipe_from_builddir run_unittests.py::FailureTests::test_dict_forbids_duplicate_keys run_unittests.py::FailureTests::test_dict_forbids_integer_key run_unittests.py::FailureTests::test_dict_requires_key_value_pairs run_unittests.py::FailureTests::test_exception_exit_status run_unittests.py::FailureTests::test_objc_cpp_detection run_unittests.py::FailureTests::test_subproject_variables run_unittests.py::FailureTests::test_version_checked_before_parsing_options run_unittests.py::LinuxlikeTests::test_basic_soname run_unittests.py::LinuxlikeTests::test_compiler_c_stds run_unittests.py::LinuxlikeTests::test_compiler_libs_static_dedup run_unittests.py::LinuxlikeTests::test_cross_find_program run_unittests.py::LinuxlikeTests::test_custom_soname run_unittests.py::LinuxlikeTests::test_deterministic_dep_order run_unittests.py::LinuxlikeTests::test_deterministic_rpath_order run_unittests.py::LinuxlikeTests::test_identity_cross run_unittests.py::LinuxlikeTests::test_install_subdir_symlinks run_unittests.py::LinuxlikeTests::test_install_subdir_symlinks_with_default_umask run_unittests.py::LinuxlikeTests::test_install_subdir_symlinks_with_default_umask_and_mode run_unittests.py::LinuxlikeTests::test_install_umask run_unittests.py::LinuxlikeTests::test_installed_modes run_unittests.py::LinuxlikeTests::test_installed_modes_extended run_unittests.py::LinuxlikeTests::test_installed_soname run_unittests.py::LinuxlikeTests::test_override_with_exe_dep run_unittests.py::LinuxlikeTests::test_pic run_unittests.py::LinuxlikeTests::test_pkg_unfound run_unittests.py::LinuxlikeTests::test_reconfigure run_unittests.py::LinuxlikeTests::test_run_installed run_unittests.py::LinuxlikeTests::test_soname run_unittests.py::LinuxlikeTests::test_unity_subproj run_unittests.py::PythonTests::test_versions run_unittests.py::RewriterTests::test_target_add_subdir run_unittests.py::RewriterTests::test_target_remove_subdir run_unittests.py::RewriterTests::test_target_subdir run_unittests.py::NativeFileTests::test_compile_sys_path run_unittests.py::NativeFileTests::test_find_program run_unittests.py::NativeFileTests::test_multiple_native_files run_unittests.py::NativeFileTests::test_multiple_native_files_override run_unittests.py::NativeFileTests::test_native_file_dirs run_unittests.py::NativeFileTests::test_native_file_dirs_overriden run_unittests.py::NativeFileTests::test_native_file_is_pipe run_unittests.py::NativeFileTests::test_python3_module run_unittests.py::NativeFileTests::test_python_module run_unittests.py::CrossFileTests::test_cross_file_dirs run_unittests.py::CrossFileTests::test_cross_file_dirs_chain run_unittests.py::CrossFileTests::test_cross_file_dirs_overriden run_unittests.py::TAPParserTests::test_diagnostics run_unittests.py::TAPParserTests::test_directive_case run_unittests.py::TAPParserTests::test_directive_explanation run_unittests.py::TAPParserTests::test_empty run_unittests.py::TAPParserTests::test_empty_plan run_unittests.py::TAPParserTests::test_many_early_plan run_unittests.py::TAPParserTests::test_many_late_plan run_unittests.py::TAPParserTests::test_middle_plan run_unittests.py::TAPParserTests::test_one_test_early_plan run_unittests.py::TAPParserTests::test_one_test_late_plan run_unittests.py::TAPParserTests::test_one_test_not_ok run_unittests.py::TAPParserTests::test_one_test_ok run_unittests.py::TAPParserTests::test_one_test_skip run_unittests.py::TAPParserTests::test_one_test_skip_failure run_unittests.py::TAPParserTests::test_one_test_todo run_unittests.py::TAPParserTests::test_one_test_with_name run_unittests.py::TAPParserTests::test_one_test_with_number run_unittests.py::TAPParserTests::test_out_of_order run_unittests.py::TAPParserTests::test_plan_directive run_unittests.py::TAPParserTests::test_too_few run_unittests.py::TAPParserTests::test_too_few_bailout run_unittests.py::TAPParserTests::test_too_many run_unittests.py::TAPParserTests::test_too_many_plans run_unittests.py::TAPParserTests::test_unexpected run_unittests.py::TAPParserTests::test_version run_unittests.py::TAPParserTests::test_yaml
mesonbuild/mconf.py
mesonbuild/mconf.py