File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
llvm/utils/gn/secondary/compiler-rt/lib Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,10 @@ group("lib") {
5
5
" //compiler-rt/lib/cfi:ignorelist($host_toolchain )" ,
6
6
]
7
7
if (current_os == " linux" ) {
8
- deps += [ " //compiler-rt/lib/msan" ]
8
+ deps += [
9
+ " //compiler-rt/lib/builtins:crt" ,
10
+ " //compiler-rt/lib/msan" ,
11
+ ]
9
12
}
10
13
if (current_os == " linux" || current_os == " android" ) {
11
14
deps += [ " //compiler-rt/lib/ubsan_minimal" ]
Original file line number Diff line number Diff line change @@ -574,6 +574,38 @@ static_library("builtins") {
574
574
deps = lse_targets
575
575
}
576
576
577
+ if (current_os == " linux" ) {
578
+ source_set (" crt_src" ) {
579
+ sources = [
580
+ " crtbegin.c" ,
581
+ " crtend.c" ,
582
+ ]
583
+ cflags = [
584
+ " -std=c11" ,
585
+ " -fPIC" ,
586
+ ]
587
+ }
588
+ copy (" crtbegin" ) {
589
+ # TODO: use get_target_outputs if it ever works with source_set to avoid hardcoding crt_src.crtbegin.o
590
+ input_dir = get_label_info (" :crt_src" , " target_out_dir" )
591
+ sources = [ " $input_dir /crt_src.crtbegin.o" ]
592
+ outputs = [ " $crt_current_out_dir /clang_rt.crtbegin.o" ]
593
+ deps = [ " :crt_src" ]
594
+ }
595
+ copy (" crtend" ) {
596
+ input_dir = get_label_info (" :crt_src" , " target_out_dir" )
597
+ sources = [ " $input_dir /crt_src.crtend.o" ]
598
+ outputs = [ " $crt_current_out_dir /clang_rt.crtend.o" ]
599
+ deps = [ " :crt_src" ]
600
+ }
601
+ group (" crt" ) {
602
+ deps = [
603
+ " :crtbegin" ,
604
+ " :crtend" ,
605
+ ]
606
+ }
607
+ }
608
+
577
609
# Currently unused but necessary to make sync_source_lists_from_cmake.py happy.
578
610
source_set (" _unused" ) {
579
611
sources = [
You can’t perform that action at this time.
0 commit comments