Fossil SCM

Unconditionally disable compile_commands.json generation for out-of-tree builds, in an attempt to work around a problem reported in [forum:d19061d09a8179|forum post d19061d09a8179].

stephan 2023-06-23 17:40 trunk
Commit 35f3e5bfba482db9e7e092e762cb58446fd5befd456f91a7f56fb3cf81742168
1 file changed +14 -1
+14 -1
--- auto.def
+++ auto.def
@@ -44,10 +44,16 @@
4444
# to compare the one they have against the minimum required
4545
if {[opt-bool print-minimum-sqlite-version]} {
4646
puts [get-define MINIMUM_SQLITE_VERSION]
4747
exit 0
4848
}
49
+
50
+set outOfTreeBuild 0
51
+if {![file exists fossil.1]} {
52
+ puts "This appears to be an out-of-tree build."
53
+ set outOfTreeBuild 1
54
+}
4955
5056
# sqlite wants these types if possible
5157
cc-with {-includes {stdint.h inttypes.h}} {
5258
cc-check-types uint32_t uint16_t int16_t uint8_t
5359
}
@@ -760,11 +766,18 @@
760766
return 0
761767
}
762768
}
763769
}
764770
765
-check-compile-commands
771
+if {!$outOfTreeBuild} {
772
+ check-compile-commands
773
+} else {
774
+ define MAKE_COMPILATION_DB no
775
+ puts "Disabling compile_commands.json check for out-of-tree build."
776
+ # This is an attempt to resolve the problem reported at
777
+ # https://fossil-scm.org/forum/forumpost/d19061d09a8179d0
778
+}
766779
767780
# Add -fsanitize compile and link options late: we don't want the C
768781
# checks above to run with those sanitizers enabled. It can not only
769782
# be pointless, it can actually break correct tests.
770783
set fsan [opt-val with-sanitizer]
771784
--- auto.def
+++ auto.def
@@ -44,10 +44,16 @@
44 # to compare the one they have against the minimum required
45 if {[opt-bool print-minimum-sqlite-version]} {
46 puts [get-define MINIMUM_SQLITE_VERSION]
47 exit 0
48 }
 
 
 
 
 
 
49
50 # sqlite wants these types if possible
51 cc-with {-includes {stdint.h inttypes.h}} {
52 cc-check-types uint32_t uint16_t int16_t uint8_t
53 }
@@ -760,11 +766,18 @@
760 return 0
761 }
762 }
763 }
764
765 check-compile-commands
 
 
 
 
 
 
 
766
767 # Add -fsanitize compile and link options late: we don't want the C
768 # checks above to run with those sanitizers enabled. It can not only
769 # be pointless, it can actually break correct tests.
770 set fsan [opt-val with-sanitizer]
771
--- auto.def
+++ auto.def
@@ -44,10 +44,16 @@
44 # to compare the one they have against the minimum required
45 if {[opt-bool print-minimum-sqlite-version]} {
46 puts [get-define MINIMUM_SQLITE_VERSION]
47 exit 0
48 }
49
50 set outOfTreeBuild 0
51 if {![file exists fossil.1]} {
52 puts "This appears to be an out-of-tree build."
53 set outOfTreeBuild 1
54 }
55
56 # sqlite wants these types if possible
57 cc-with {-includes {stdint.h inttypes.h}} {
58 cc-check-types uint32_t uint16_t int16_t uint8_t
59 }
@@ -760,11 +766,18 @@
766 return 0
767 }
768 }
769 }
770
771 if {!$outOfTreeBuild} {
772 check-compile-commands
773 } else {
774 define MAKE_COMPILATION_DB no
775 puts "Disabling compile_commands.json check for out-of-tree build."
776 # This is an attempt to resolve the problem reported at
777 # https://fossil-scm.org/forum/forumpost/d19061d09a8179d0
778 }
779
780 # Add -fsanitize compile and link options late: we don't want the C
781 # checks above to run with those sanitizers enabled. It can not only
782 # be pointless, it can actually break correct tests.
783 set fsan [opt-val with-sanitizer]
784

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button