@@ -886,7 +886,7 @@ def exe_suffix(filename):
886
886
887
887
# The directory where the binaries are produced. (relative to the installation
888
888
# root directory of the tool)
889
- def fastcomp_build_bin_dir (tool ):
889
+ def llvm_build_bin_dir (tool ):
890
890
build_dir = llvm_build_dir (tool )
891
891
if WINDOWS and 'Visual Studio' in CMAKE_GENERATOR :
892
892
old_llvm_bin_dir = os .path .join (build_dir , 'bin' , decide_cmake_build_type (tool ))
@@ -1108,92 +1108,6 @@ def xcode_sdk_version():
1108
1108
return subprocess .checkplatform .mac_ver ()[0 ].split ('.' )
1109
1109
1110
1110
1111
- def build_fastcomp (tool ):
1112
- debug_print ('build_fastcomp(' + str (tool ) + ')' )
1113
- fastcomp_root = tool .installation_path ()
1114
- fastcomp_src_root = os .path .join (fastcomp_root , 'src' )
1115
- # Does this tool want to be git cloned from github?
1116
- if hasattr (tool , 'git_branch' ):
1117
- success = git_clone_checkout_and_pull (tool .download_url (), fastcomp_src_root , tool .git_branch )
1118
- if not success :
1119
- return False
1120
- if hasattr (tool , 'clang_url' ):
1121
- clang_root = os .path .join (fastcomp_src_root , 'tools/clang' )
1122
- success = git_clone_checkout_and_pull (tool .clang_url , clang_root , tool .git_branch )
1123
- if not success :
1124
- return False
1125
- if hasattr (tool , 'lld_url' ):
1126
- lld_root = os .path .join (fastcomp_src_root , 'tools/lld' )
1127
- success = git_clone_checkout_and_pull (tool .lld_url , lld_root , tool .git_branch )
1128
- if not success :
1129
- return False
1130
- else :
1131
- # Not a git cloned tool, so instead download from git tagged releases
1132
- success = download_and_unzip (tool .download_url (), fastcomp_src_root , filename_prefix = 'llvm-e' )
1133
- if not success :
1134
- return False
1135
- success = download_and_unzip (tool .windows_clang_url if WINDOWS else tool .unix_clang_url , os .path .join (fastcomp_src_root , 'tools/clang' ), filename_prefix = 'clang-e' )
1136
- if not success :
1137
- return False
1138
-
1139
- args = []
1140
-
1141
- cmake_generator = CMAKE_GENERATOR
1142
- if 'Visual Studio 16' in CMAKE_GENERATOR : # VS2019
1143
- # With Visual Studio 16 2019, CMake changed the way they specify target arch.
1144
- # Instead of appending it into the CMake generator line, it is specified
1145
- # with a -A arch parameter.
1146
- args += ['-A' , 'x64' if tool .bitness == 64 else 'x86' ]
1147
- elif 'Visual Studio' in CMAKE_GENERATOR and tool .bitness == 64 :
1148
- cmake_generator += ' Win64'
1149
-
1150
- build_dir = llvm_build_dir (tool )
1151
- build_root = os .path .join (fastcomp_root , build_dir )
1152
-
1153
- build_type = decide_cmake_build_type (tool )
1154
-
1155
- # Configure
1156
- tests_arg = 'ON' if BUILD_FOR_TESTING else 'OFF'
1157
-
1158
- enable_assertions = ENABLE_LLVM_ASSERTIONS .lower () == 'on' or (ENABLE_LLVM_ASSERTIONS == 'auto' and build_type .lower () != 'release' and build_type .lower () != 'minsizerel' )
1159
-
1160
- only_supports_wasm = hasattr (tool , 'only_supports_wasm' )
1161
- if ARCH == 'x86' or ARCH == 'x86_64' :
1162
- targets_to_build = 'X86'
1163
- elif ARCH == 'arm' :
1164
- targets_to_build = 'ARM'
1165
- elif ARCH == 'aarch64' :
1166
- targets_to_build = 'AArch64'
1167
- else :
1168
- # May have problems with emconfigure
1169
- targets_to_build = ''
1170
- if not only_supports_wasm :
1171
- if targets_to_build != '' :
1172
- targets_to_build += ';'
1173
- targets_to_build += 'JSBackend'
1174
- args += ['-DLLVM_TARGETS_TO_BUILD=' + targets_to_build , '-DLLVM_INCLUDE_EXAMPLES=OFF' , '-DCLANG_INCLUDE_EXAMPLES=OFF' , '-DLLVM_INCLUDE_TESTS=' + tests_arg , '-DCLANG_INCLUDE_TESTS=' + tests_arg , '-DLLVM_ENABLE_ASSERTIONS=' + ('ON' if enable_assertions else 'OFF' )]
1175
- if os .getenv ('LLVM_CMAKE_ARGS' ):
1176
- extra_args = os .environ ['LLVM_CMAKE_ARGS' ].split (',' )
1177
- print ('Passing the following extra arguments to LLVM CMake configuration: ' + str (extra_args ))
1178
- args += extra_args
1179
-
1180
- # MacOS < 10.13 workaround for LLVM build bug https://github.com/kripken/emscripten/issues/5418:
1181
- # specify HAVE_FUTIMENS=0 in the build if building with target SDK that is older than 10.13.
1182
- if MACOS and ('HAVE_FUTIMENS' not in os .getenv ('LLVM_CMAKE_ARGS' , '' )) and xcode_sdk_version () < ['10' , '13' ]:
1183
- print ('Passing -DHAVE_FUTIMENS=0 to LLVM CMake configure to workaround https://github.com/kripken/emscripten/issues/5418. Please update to macOS 10.13 or newer' )
1184
- args += ['-DHAVE_FUTIMENS=0' ]
1185
-
1186
- success = cmake_configure (cmake_generator , build_root , fastcomp_src_root , build_type , args )
1187
- if not success :
1188
- return False
1189
-
1190
- # Make
1191
- success = make_build (build_root , build_type , 'x64' if tool .bitness == 64 else 'Win32' )
1192
- return success
1193
-
1194
-
1195
- # LLVM git source tree migrated to a single repository instead of multiple
1196
- # ones, build_llvm() builds via that repository structure
1197
1111
def build_llvm (tool ):
1198
1112
debug_print ('build_llvm(' + str (tool ) + ')' )
1199
1113
llvm_root = tool .installation_path ()
@@ -1758,10 +1672,9 @@ def expand_vars(self, str):
1758
1672
if '%generator_prefix%' in str :
1759
1673
str = str .replace ('%generator_prefix%' , cmake_generator_prefix ())
1760
1674
str = str .replace ('%.exe%' , '.exe' if WINDOWS else '' )
1761
- if '%fastcomp_build_dir%' in str :
1762
- str = str .replace ('%fastcomp_build_dir%' , llvm_build_dir (self ))
1763
- if '%fastcomp_build_bin_dir%' in str :
1764
- str = str .replace ('%fastcomp_build_bin_dir%' , fastcomp_build_bin_dir (self ))
1675
+ if '%llvm_build_bin_dir%' in str :
1676
+ str = str .replace ('%llvm_build_bin_dir%' , llvm_build_bin_dir (self ))
1677
+
1765
1678
return str
1766
1679
1767
1680
# Return true if this tool requires building from source, and false if this is a precompiled tool.
@@ -2007,7 +1920,7 @@ def install_sdk(self):
2007
1920
2008
1921
if getattr (self , 'custom_install_script' , None ) == 'emscripten_npm_install' :
2009
1922
# upstream tools have hardcoded paths that are not stored in emsdk_manifest.json registry
2010
- install_path = 'upstream' if 'releases-upstream' in self . version else 'fastcomp'
1923
+ install_path = 'upstream'
2011
1924
emscripten_dir = os .path .join (EMSDK_PATH , install_path , 'emscripten' )
2012
1925
# Older versions of the sdk did not include the node_modules directory
2013
1926
# and require `npm ci` to be run post-install
@@ -2033,9 +1946,7 @@ def install_tool(self):
2033
1946
print ("Installing tool '" + str (self ) + "'.." )
2034
1947
url = self .download_url ()
2035
1948
2036
- if hasattr (self , 'custom_install_script' ) and self .custom_install_script == 'build_fastcomp' :
2037
- success = build_fastcomp (self )
2038
- elif hasattr (self , 'custom_install_script' ) and self .custom_install_script == 'build_llvm' :
1949
+ if hasattr (self , 'custom_install_script' ) and self .custom_install_script == 'build_llvm' :
2039
1950
success = build_llvm (self )
2040
1951
elif hasattr (self , 'custom_install_script' ) and self .custom_install_script == 'build_ninja' :
2041
1952
success = build_ninja (self )
@@ -2056,8 +1967,8 @@ def install_tool(self):
2056
1967
success = emscripten_post_install (self )
2057
1968
elif self .custom_install_script == 'emscripten_npm_install' :
2058
1969
success = emscripten_npm_install (self , self .installation_path ())
2059
- elif self .custom_install_script in ('build_fastcomp' , ' build_llvm' , 'build_ninja' , 'build_ccache' ):
2060
- # 'build_fastcomp ' is a special one that does the download on its
1970
+ elif self .custom_install_script in ('build_llvm' , 'build_ninja' , 'build_ccache' ):
1971
+ # 'build_llvm ' is a special one that does the download on its
2061
1972
# own, others do the download manually.
2062
1973
pass
2063
1974
elif self .custom_install_script == 'build_binaryen' :
@@ -2344,25 +2255,22 @@ def get_installed_sdk_version():
2344
2255
# Get a list of tags for emscripten-releases.
2345
2256
def load_releases_tags ():
2346
2257
tags = []
2347
- tags_fastcomp = []
2348
2258
info = load_releases_info ()
2349
2259
2350
2260
for version , sha in sorted (info ['releases' ].items (), key = lambda x : version_key (x [0 ])):
2351
2261
tags .append (sha )
2352
- # Only include versions older than 1.39.0 in fastcomp releases
2353
- if version_key (version ) < (2 , 0 , 0 ):
2354
- tags_fastcomp .append (sha )
2355
2262
2356
2263
if extra_release_tag :
2357
2264
tags .append (extra_release_tag )
2358
2265
2359
2266
# Explicitly add the currently installed SDK version. This could be a custom
2360
- # version (installed explicitly) so it might not be part of the main list loaded above.
2267
+ # version (installed explicitly) so it might not be part of the main list
2268
+ # loaded above.
2361
2269
installed = get_installed_sdk_version ()
2362
2270
if installed and installed not in tags :
2363
2271
tags .append (installed )
2364
2272
2365
- return tags , tags_fastcomp
2273
+ return tags
2366
2274
2367
2275
2368
2276
def load_releases_versions ():
@@ -2390,7 +2298,7 @@ def load_sdk_manifest():
2390
2298
llvm_precompiled_tags_64bit = load_file_index_list ('llvm-tags-64bit.txt' )
2391
2299
llvm_precompiled_tags = llvm_precompiled_tags_32bit + llvm_precompiled_tags_64bit
2392
2300
binaryen_tags = load_legacy_binaryen_tags ()
2393
- releases_tags , releases_tags_fastcomp = load_releases_tags ()
2301
+ releases_tags = load_releases_tags ()
2394
2302
2395
2303
def dependencies_exist (sdk ):
2396
2304
for tool_name in sdk .uses :
@@ -2474,8 +2382,6 @@ def expand_category_param(param, category_list, t, is_sdk):
2474
2382
expand_category_param ('%precompiled_tag64%' , llvm_precompiled_tags_64bit , t , is_sdk = False )
2475
2383
elif '%binaryen_tag%' in t .version :
2476
2384
expand_category_param ('%binaryen_tag%' , binaryen_tags , t , is_sdk = False )
2477
- elif '%releases-tag%' in t .version and 'fastcomp' in t .version :
2478
- expand_category_param ('%releases-tag%' , releases_tags_fastcomp , t , is_sdk = False )
2479
2385
elif '%releases-tag%' in t .version :
2480
2386
expand_category_param ('%releases-tag%' , releases_tags , t , is_sdk = False )
2481
2387
else :
@@ -2496,8 +2402,6 @@ def expand_category_param(param, category_list, t, is_sdk):
2496
2402
expand_category_param ('%precompiled_tag32%' , llvm_precompiled_tags_32bit , sdk , is_sdk = True )
2497
2403
elif '%precompiled_tag64%' in sdk .version :
2498
2404
expand_category_param ('%precompiled_tag64%' , llvm_precompiled_tags_64bit , sdk , is_sdk = True )
2499
- elif '%releases-tag%' in sdk .version and 'fastcomp' in sdk .version :
2500
- expand_category_param ('%releases-tag%' , releases_tags_fastcomp , sdk , is_sdk = True )
2501
2405
elif '%releases-tag%' in sdk .version :
2502
2406
expand_category_param ('%releases-tag%' , releases_tags , sdk , is_sdk = True )
2503
2407
else :
@@ -2780,16 +2684,12 @@ def error_on_missing_tool(name):
2780
2684
exit_with_error ("tool or SDK not found: '%s'" % name )
2781
2685
2782
2686
2783
- def exit_with_fastcomp_error ():
2784
- exit_with_error ('the fastcomp backend is not getting new builds or releases. Please use the upstream llvm backend or use an older version than 2.0.0 (such as 1.40.1).' )
2785
-
2786
-
2787
2687
def expand_sdk_name (name , activating ):
2788
2688
if 'upstream-master' in name :
2789
2689
errlog ('upstream-master SDK has been renamed upstream-main' )
2790
2690
name = name .replace ('upstream-master' , 'upstream-main' )
2791
- if name in ( 'latest- fastcomp', 'latest-releases-fastcomp' , 'tot-fastcomp' , 'sdk-nightly-latest' ) :
2792
- exit_with_fastcomp_error ( )
2691
+ if ' fastcomp' in name :
2692
+ exit_with_error ( 'the fastcomp backend is no longer supported. Please use an older version of emsdk (for example 3.1.29) if you want to install the old fastcomp-based SDK' )
2793
2693
if name in ('tot' , 'sdk-tot' , 'tot-upstream' ):
2794
2694
if activating :
2795
2695
# When we are activating a tot release, assume that the currently
@@ -2806,37 +2706,24 @@ def expand_sdk_name(name, activating):
2806
2706
2807
2707
# check if it's a release handled by an emscripten-releases version,
2808
2708
# and if so use that by using the right hash. we support a few notations,
2809
- # x.y.z[-( upstream|fastcomp_])
2810
- # sdk-x.y.z[-( upstream|fastcomp_]) -64bit
2709
+ # x.y.z[-upstream]
2710
+ # sdk-x.y.z[-upstream] -64bit
2811
2711
# TODO: support short notation for old builds too?
2812
- backend = None
2712
+ backend = 'upstream'
2813
2713
fullname = name
2814
2714
if '-upstream' in fullname :
2815
2715
fullname = name .replace ('-upstream' , '' )
2816
- backend = 'upstream'
2817
- elif '-fastcomp' in fullname :
2818
- fullname = fullname .replace ('-fastcomp' , '' )
2819
- backend = 'fastcomp'
2820
2716
version = fullname .replace ('sdk-' , '' ).replace ('releases-' , '' ).replace ('-64bit' , '' ).replace ('tag-' , '' )
2821
2717
sdk = 'sdk-' if not name .startswith ('releases-' ) else ''
2822
2718
releases_info = load_releases_info ()['releases' ]
2823
2719
release_hash = get_release_hash (version , releases_info )
2824
2720
if release_hash :
2825
2721
# Known release hash
2826
- if backend == 'fastcomp' and version_key (version ) >= (2 , 0 , 0 ):
2827
- exit_with_fastcomp_error ()
2828
- if backend is None :
2829
- if version_key (version ) >= (1 , 39 , 0 ):
2830
- backend = 'upstream'
2831
- else :
2832
- backend = 'fastcomp'
2833
2722
full_name = '%sreleases-%s-%s-64bit' % (sdk , backend , release_hash )
2834
2723
print ("Resolving SDK version '%s' to '%s'" % (version , full_name ))
2835
2724
return full_name
2836
2725
2837
2726
if len (version ) == 40 :
2838
- if backend is None :
2839
- backend = 'upstream'
2840
2727
global extra_release_tag
2841
2728
extra_release_tag = version
2842
2729
return '%sreleases-%s-%s-64bit' % (sdk , backend , version )
0 commit comments