diff options
| author | Satya Durga Srinivasu Prabhala <satyap@codeaurora.org> | 2017-05-22 17:00:49 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-06-23 00:20:28 -0700 |
| commit | c2e1e3afdb3cdfdb5797cdee4ca34b16058ea3dc (patch) | |
| tree | 0060194ef83b65b52dee07836be4f04dd46cabf9 /scripts/build-all.py | |
| parent | f46488ee3bc9b3c2a3a371d98cd59f047c006f04 (diff) | |
scripts: set clang as REAL_CC to support LLVM by default
To support LLVM by default, set REAL_CC to clang which overrides
gcc.
Also, white list warnings which are being treated as errors
while compiling Kernel with clang compiler.
Change-Id: I5df2375cb8a2f424521fdd862d550ab340a34c98
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Signed-off-by: Naitik Bharadiya <bharad@codeaurora.org>
Diffstat (limited to 'scripts/build-all.py')
| -rwxr-xr-x | scripts/build-all.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/build-all.py b/scripts/build-all.py index 4f02c33d4248..a3ac915099c1 100755 --- a/scripts/build-all.py +++ b/scripts/build-all.py @@ -1,6 +1,6 @@ #! /usr/bin/env python2 -# Copyright (c) 2009-2015, The Linux Foundation. All rights reserved. +# Copyright (c) 2009-2015, 2017, 2019, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -45,6 +45,7 @@ build_dir = '../all-kernels' make_command = ["vmlinux", "modules", "dtbs"] all_options = {} compile64 = os.environ.get('CROSS_COMPILE64') +clang_bin = os.environ.get('CLANG_BIN') def error(msg): sys.stderr.write("error: %s\n" % msg) @@ -269,10 +270,18 @@ class Builder(): if not all_options.updateconfigs: # Build targets can be dependent upon the completion of # previous build targets, so build them one at a time. - cmd_line = ['make', - 'INSTALL_HDR_PATH=%s' % hdri_dir, - 'INSTALL_MOD_PATH=%s' % modi_dir, - 'O=%s' % dest_dir] + if os.environ.get('ARCH') == "arm64": + cmd_line = ['make', + 'INSTALL_HDR_PATH=%s' % hdri_dir, + 'INSTALL_MOD_PATH=%s' % modi_dir, + 'O=%s' % dest_dir, + 'REAL_CC=%s' % clang_bin] + else: + cmd_line = ['make', + 'INSTALL_HDR_PATH=%s' % hdri_dir, + 'INSTALL_MOD_PATH=%s' % modi_dir, + 'O=%s' % dest_dir] + build_targets = [] for c in make_command: if re.match(r'^-{1,2}\w', c): |
