diff --git a/llvm-build/README.md b/llvm-build/README.md index f7be8cf15d394b27d0db1bbfa83124e0e0b8c79a..689ae00beda254663c36f497765d0fa36f074ab7 100644 --- a/llvm-build/README.md +++ b/llvm-build/README.md @@ -75,6 +75,8 @@ When build successfully completed. following artifacts will be available in `out `sysroot` -> sysroots for OHOS targets `install` -> toolchain build + +following artifacts will be available in `packages` directory `*.tar.bz2` -> archived versions of toolchain and sysroots
diff --git a/llvm-build/build.py b/llvm-build/build.py index c751738e5dbd8ea7f5d12fda0219a27dcf7b66d7..dd62bc0f36d88694c1656832a2d22bccd098dae7 100755 --- a/llvm-build/build.py +++ b/llvm-build/build.py @@ -597,6 +597,7 @@ class LlvmCore(BuildUtils): cflags = '-fstack-protector-strong' if not self.host_is_darwin(): ldflags += ' -Wl,-z,relro,-z,now -pie' + cflags += ' -D_FORTIFY_SOURCE=2' if self.build_config.strip: ldflags += ' -s' @@ -894,6 +895,7 @@ class LlvmLibs(BuildUtils): '--target=%s' % llvm_triple, '-ffunction-sections', '-fdata-sections', + '-D_FORTIFY_SOURCE=2', extra_flags, ] cflags.extend(cflag)