@@ -48,12 +48,23 @@ def build(self, host_target):
48
48
llvm_build_dir = os .path .join ('..' , build_root , '%s-%s' % ('llvm' , host_target ))
49
49
build_jobs = self .args .build_jobs or multiprocessing .cpu_count ()
50
50
51
+ sysroot_build_dir = WASILibc .sysroot_build_path (build_root , host_target )
52
+ # FIXME: Manually create an empty dir that is usually created during
53
+ # check-symbols. The directory is required during sysroot installation step.
54
+ os .makedirs (os .path .join (sysroot_build_dir , "share" ), exist_ok = True )
55
+
51
56
shell .call ([
52
57
'make' , 'install' ,
53
58
'-j' , str (build_jobs ),
59
+ # FIXME: wasi-libc's pre-defined macro list does not expect
60
+ # `__FPCLASS_XXX`, which is introduced by the LLVM 17, yet.
61
+ # So skip the symbol check step by treating the phony target
62
+ # as very old file.
63
+ # https://github.com/llvm/llvm-project/commit/7dd387d2971d7759cadfffeb2082439f6c7ddd49
64
+ '--old-file=check-symbols' ,
54
65
'-C' , self .source_dir ,
55
66
'OBJDIR=' + os .path .join (self .build_dir , 'obj' ),
56
- 'SYSROOT=' + WASILibc . sysroot_build_path ( build_root , host_target ) ,
67
+ 'SYSROOT=' + sysroot_build_dir ,
57
68
'INSTALL_DIR=' + WASILibc .sysroot_install_path (build_root ),
58
69
'CC=' + os .path .join (llvm_build_dir , 'bin' , 'clang' ),
59
70
'AR=' + os .path .join (llvm_build_dir , 'bin' , 'llvm-ar' ),
0 commit comments