File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ pub struct Config {
50
50
// llvm codegen options
51
51
pub llvm_assertions : bool ,
52
52
pub llvm_optimize : bool ,
53
+ pub llvm_release_debuginfo : bool ,
53
54
pub llvm_version_check : bool ,
54
55
pub llvm_static_stdcpp : bool ,
55
56
@@ -137,6 +138,7 @@ struct Llvm {
137
138
ninja : Option < bool > ,
138
139
assertions : Option < bool > ,
139
140
optimize : Option < bool > ,
141
+ release_debuginfo : Option < bool > ,
140
142
version_check : Option < bool > ,
141
143
static_libstdcpp : Option < bool > ,
142
144
}
@@ -243,6 +245,7 @@ impl Config {
243
245
set ( & mut config. ninja , llvm. ninja ) ;
244
246
set ( & mut config. llvm_assertions , llvm. assertions ) ;
245
247
set ( & mut config. llvm_optimize , llvm. optimize ) ;
248
+ set ( & mut config. llvm_release_debuginfo , llvm. release_debuginfo ) ;
246
249
set ( & mut config. llvm_version_check , llvm. version_check ) ;
247
250
set ( & mut config. llvm_static_stdcpp , llvm. static_libstdcpp ) ;
248
251
}
Original file line number Diff line number Diff line change 17
17
# Indicates whether the LLVM build is a Release or Debug build
18
18
#optimize = true
19
19
20
+ # Indicates whether an LLVM Release build should include debug info
21
+ #release-debuginfo = false
22
+
20
23
# Indicates whether the LLVM assertions are enabled or not
21
24
#assertions = false
22
25
Original file line number Diff line number Diff line change @@ -67,10 +67,17 @@ pub fn llvm(build: &Build, target: &str) {
67
67
if build. config . ninja {
68
68
cfg. generator ( "Ninja" ) ;
69
69
}
70
+
71
+ let profile = match ( build. config . llvm_optimize , build. config . llvm_release_debuginfo ) {
72
+ ( false , _) => "Debug" ,
73
+ ( true , false ) => "Release" ,
74
+ ( true , true ) => "RelWithDebInfo" ,
75
+ } ;
76
+
70
77
cfg. target ( target)
71
78
. host ( & build. config . build )
72
79
. out_dir ( & dst)
73
- . profile ( if build . config . llvm_optimize { "Release" } else { "Debug" } )
80
+ . profile ( profile )
74
81
. define ( "LLVM_ENABLE_ASSERTIONS" , assertions)
75
82
. define ( "LLVM_TARGETS_TO_BUILD" , "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend" )
76
83
. define ( "LLVM_INCLUDE_EXAMPLES" , "OFF" )
You can’t perform that action at this time.
0 commit comments