Skip to content

Commit

Permalink
Support x64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
JSUYA committed Jun 12, 2024
1 parent f967dfc commit 780572e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
arch: [arm, arm64, x86]
arch: [arm, arm64, x86, x64]
mode: [debug, release, profile]
include:
- arch: arm
Expand All @@ -22,11 +22,17 @@ jobs:
triple: aarch64-linux-gnu
- arch: x86
triple: i686-linux-gnu
- arch: x64
triple: x86_64-linux-gnu
exclude:
- arch: x86
mode: release
- arch: x86
mode: profile
- arch: x64
mode: release
- arch: x64
mode: profile

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions ci/tizen/build_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ for name in ar readelf nm strip; do
ln -sf llvm-$name arm-linux-gnueabi-$name
ln -sf llvm-$name aarch64-linux-gnu-$name
ln -sf llvm-$name i686-linux-gnu-$name
ln -sf llvm-$name x86_64-linux-gnu-$name
done
19 changes: 12 additions & 7 deletions ci/tizen/generate_sysroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):
tizen_arch = 'aarch64'
elif arch == 'x86':
tizen_arch = 'i686'
elif arch == 'x64':
tizen_arch = 'x86_64'
else:
sys.exit('Unknown arch: ' + arch)

Expand Down Expand Up @@ -87,14 +89,17 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):

# Create symbolic links.
asm = sysroot / 'usr' / 'include' / 'asm'
if not asm.exists():
os.symlink('asm-' + arch, asm)
if (arch == 'x64'):
os.symlink('asm-generic', asm)
else:
if not asm.exists():
os.symlink('asm-' + arch, asm)
pkgconfig = sysroot / 'usr' / 'lib' / 'pkgconfig'
if arch == 'arm64' and not pkgconfig.exists():
if (arch == 'arm64' or arch == 'x64') and not pkgconfig.exists():
os.symlink('../lib64/pkgconfig', pkgconfig)

# Copy objects required by the linker, such as crtbeginS.o and libgcc.a.
if arch == 'arm64':
if arch == 'arm64' or arch == 'x64':
libpath = sysroot / 'usr' / 'lib64'
else:
libpath = sysroot / 'usr' / 'lib'
Expand Down Expand Up @@ -122,9 +127,9 @@ def main():
parser.add_argument(
'--api-version',
metavar='VER',
default=5.5,
default=6.0,
type=float,
help='Target API version (defaults to 5.5)'
help='Target API version (defaults to 6.0)'
)
args = parser.parse_args()

Expand All @@ -134,7 +139,7 @@ def main():
outpath = Path(__file__).parent / 'sysroot'
outpath.mkdir(exist_ok=True)

for arch in ['arm', 'arm64', 'x86']:
for arch in ['arm', 'arm64', 'x86', 'x64']:
sysroot = outpath / arch
if args.force and sysroot.is_dir():
shutil.rmtree(sysroot)
Expand Down

0 comments on commit 780572e

Please sign in to comment.