class CCompilerOpt(_Config, _Distutils, _Cache, _CCompiler, _Feature, _Parse):
CCompiler
aims to provide extra build options
to effectively control of compiler optimizations that are directly
related to CPU features.Method | cpu_baseline_flags |
Returns a list of final CPU baseline compiler flags |
Method | cpu_baseline_names |
return a list of final CPU baseline feature names |
Method | cpu_dispatch_names |
return a list of final CPU dispatch feature names |
Method | generate_dispatch_header |
Generate the dispatch header which contains the #definitions and headers for platform-specific instruction-sets for the enabled CPU baseline and dispatch-able features. |
Method | is_cached |
Returns True if the class loaded from the cache file |
Method | report |
Undocumented |
Method | try_dispatch |
Compile one or more dispatch-able sources and generates object files, also generates abstract C config headers and macros that used later for the final runtime dispatching process. |
Method | __init__ |
Undocumented |
Method | _generate_config |
Undocumented |
Method | _wrap_target |
Undocumented |
Instance Variable | _requested_baseline |
Undocumented |
Instance Variable | _requested_dispatch |
Undocumented |
Instance Variable | hit_cache |
Undocumented |
Instance Variable | sources_status |
Undocumented |
Inherited from _Config
:
Method | conf_features_partial |
No summary |
Class Variable | conf_c_prefix |
Undocumented |
Class Variable | conf_c_prefix_ |
Undocumented |
Class Variable | conf_cc_flags |
Undocumented |
Class Variable | conf_check_path |
Undocumented |
Class Variable | conf_features |
Undocumented |
Class Variable | conf_min_features |
Undocumented |
Class Variable | conf_nocache |
Undocumented |
Class Variable | conf_noopt |
Undocumented |
Class Variable | conf_target_groups |
Undocumented |
Instance Variable | conf_cache_factors |
Undocumented |
Instance Variable | conf_tmp_path |
Undocumented |
Inherited from _Distutils
:
Static Method | dist_error |
Raise a compiler error |
Static Method | dist_fatal |
Raise a distutils error |
Static Method | dist_load_module |
Load a module from file, required by the abstract class '_Cache'. |
Static Method | dist_log |
Print a console message |
Static Method | _dist_str |
Return a string to print by log and errors. |
Static Method | _dist_test_spawn |
Undocumented |
Method | _dist_test_spawn_paths |
Fix msvc SDK ENV path same as distutils do without it we get c1: fatal error C1356: unable to find mspdbcore.dll |
Method | dist_compile |
Wrap CCompiler.compile() |
Method | dist_info |
No summary |
Method | dist_test |
Return True if 'CCompiler.compile()' able to compile a source file with certain flags. |
Class Variable | _dist_warn_regex |
Undocumented |
Instance Variable | _ccompiler |
Undocumented |
Instance Variable | _dist_info |
Undocumented |
Inherited from _Cache
:
Static Method | me |
A static method that can be treated as a decorator to dynamically cache certain methods. |
Method | __del__ |
Undocumented |
Method | cache_flush |
Force update the cache. |
Method | cache_hash |
Undocumented |
Class Variable | _cache_ignore |
Undocumented |
Instance Variable | _cache_hash |
Undocumented |
Instance Variable | _cache_path |
Undocumented |
Instance Variable | cache_infile |
Undocumented |
Instance Variable | cache_me |
Undocumented |
Instance Variable | cache_private |
Undocumented |
Inherited from _CCompiler
:
Method | _cc_normalize_unix |
Undocumented |
Method | _cc_normalize_win |
Undocumented |
Method | cc_normalize_flags |
Remove the conflicts that caused due gathering implied features flags. |
Method | cc_test_flags |
Returns True if the compiler supports 'flags'. |
Class Variable | _cc_normalize_arch_ver |
Undocumented |
Class Variable | _cc_normalize_unix_frgx |
Undocumented |
Class Variable | _cc_normalize_unix_krgx |
Undocumented |
Class Variable | _cc_normalize_unix_mrgx |
Undocumented |
Class Variable | _cc_normalize_win_frgx |
Undocumented |
Class Variable | _cc_normalize_win_mrgx |
Undocumented |
Instance Variable | cc_flags |
Undocumented |
Instance Variable | cc_is_cached |
Undocumented |
Instance Variable | cc_is_gcc |
Undocumented |
Instance Variable | cc_march |
Undocumented |
Instance Variable | cc_name |
Undocumented |
Instance Variable | cc_noopt |
Undocumented |
Inherited from _Feature
:
Method | feature_ahead |
Return list of features in 'names' after remove any implied features and keep the origins. |
Method | feature_c_preprocessor |
Generate C preprocessor definitions and include headers of a CPU feature. |
Method | feature_can_autovec |
check if the feature can be auto-vectorized by the compiler |
Method | feature_detect |
Return a list of CPU features that required to be detected sorted from the lowest to highest interest. |
Method | feature_extra_checks |
Return a list of supported extra checks after testing them against the compiler. |
Method | feature_flags |
Return a list of CPU features flags sorted from the lowest to highest interest. |
Method | feature_get_til |
No summary |
Method | feature_implies |
Return a set of CPU features that implied by 'names' |
Method | feature_implies_c |
same as feature_implies() but combining 'names' |
Method | feature_is_exist |
Returns True if a certain feature is exist and covered within _Config.conf_features . |
Method | feature_is_supported |
Check if a certain CPU feature is supported by the platform and compiler. |
Method | feature_names |
Returns a set of CPU feature names that supported by platform and the C compiler. |
Method | feature_sorted |
Sort a list of CPU features ordered by the lowest interest. |
Method | feature_test |
Test a certain CPU feature against the compiler through its own check file. |
Method | feature_untied |
same as 'feature_ahead()' but if both features implied each other and keep the highest interest. |
Instance Variable | feature_is_cached |
Undocumented |
Instance Variable | feature_min |
Undocumented |
Instance Variable | feature_supported |
Undocumented |
Inherited from _Parse
:
Method | _parse_arg_features |
Undocumented |
Method | _parse_multi_target |
validate multi targets that defined between parentheses() |
Method | _parse_policy_autovec |
skip features that has no auto-vectorized support by compiler |
Method | _parse_policy_keepsort |
leave a notice that $keep_sort is on |
Method | _parse_policy_maxopt |
append the compiler optimization flags |
Method | _parse_policy_not_keepbase |
skip all baseline features |
Method | _parse_policy_not_keepsort |
sorted depend on the highest interest |
Method | _parse_policy_werror |
force warnings to treated as errors |
Method | _parse_target_tokens |
Undocumented |
Method | _parse_token_group |
validate group token |
Method | _parse_token_policy |
validate policy token |
Method | parse_targets |
No summary |
Class Variable | _parse_regex_arg |
Undocumented |
Class Variable | _parse_regex_target |
Undocumented |
Instance Variable | _parse_policies |
Undocumented |
Instance Variable | parse_baseline_flags |
Undocumented |
Instance Variable | parse_baseline_names |
Undocumented |
Instance Variable | parse_dispatch_names |
Undocumented |
Instance Variable | parse_is_cached |
Undocumented |
Instance Variable | parse_target_groups |
Undocumented |
Generate the dispatch header which contains the #definitions and headers for platform-specific instruction-sets for the enabled CPU baseline and dispatch-able features.
Its highly recommended to take a look at the generated header
also the generated source files via try_dispatch()
in order to get the full picture.
Compile one or more dispatch-able sources and generates object files, also generates abstract C config headers and macros that used later for the final runtime dispatching process.
The mechanism behind it is to takes each source file that specified in 'sources' and branching it into several files depend on special configuration statements that must be declared in the top of each source which contains targeted CPU features, then it compiles every branched source with the proper compiler flags.
CCompiler
instance to be used for compilation.
If None (default), the provided instance during the initialization
will be used instead.CCompiler.compile()
list : generated object files
CCompiler.compile()
on compiling failure.