bazel create rule to build relocatable object file with -m elf_x86_64

76 views
Skip to first unread message

gnanasekar loganathan

unread,
Sep 5, 2023, 10:32:41 AM9/5/23
to bazel-discuss
Hi Team,

I trying to convert the makefile into bazel build file.
We have a target in Makefile to create a relocatable object by ld -melf_x86_64

How to create bazel  rule/target for this?

example:
//c file:
#include <stdio.h>
int my_func()
{
printf("Test My func!\n");
}

gcc -c test.c -o test.o
ld -melf_x86_64 -o test test.o


Thanks,
Gnana
Reply all
Reply to author
Forward
0 new messages